LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problems Installing Kernel Source rpm in Fedora Core 5 (https://www.linuxquestions.org/questions/linux-newbie-8/problems-installing-kernel-source-rpm-in-fedora-core-5-a-621883/)

thiagarn 02-17-2008 08:26 PM

Problems Installing Kernel Source rpm in Fedora Core 5
 
Hello all,

I installed Fedora Core 5 & kernel version is 2.6.15-1.2054-FC5 i686While trying to run some code, i got an error "cannot find kernel source in /lib/modules/2.6.15-1.2054-FC5.
So i went ahead and installed kernel-2.6.15-1.2054-FC5.src.rpm.

rpm -ivh kernel-2.6.15-1.2054-FC5.src.rpm

After doing this, /lib/modules/2.6.15-1.2054-FC5/source points to build.

/lib/modules/2.6.15-1.2054-FC5.source -> build

/lib/modules/2.6.15-1.2054-FC5/build points to ../../../usr/src/kernels/2.6.15-1.2054-FC5-i686

/lib/modules/2.6.15-1.2054-FC5/build -> ../../../usr/src/kernels/2.6.15-1.2054-FC5-i686

But for some reason i dont see the kernels source files installed in ../../../usr/src/kernels/2.6.15-1.2054-FC5-i686

and i still see the same error "cannot find kernel source in /lib/modules/2.6.15-1.2054-FC5.

Am i doing anything wrong? Can anybody please help me with this? Appreciate any response.

Thanks
Nandhini

Simon Bridge 02-17-2008 08:33 PM

Quote:

I installed Fedora Core 5
Give up now. FC5 is obsolete.

http://www.mjmwired.net/resources/mj...html#kernelsrc
you didn't build the source.
the source code should end up in /usr/src/redhat/BUILD/kernel-2.6.15/

However, you are probably thinking of the kernel headers:
http://www.mjmwired.net/resources/mj...#kernelheaders

2.6.15 kernel contains vulnerabilities - strongly urge an update.

thiagarn 02-18-2008 02:32 PM

Hi,

Thanks for ur reply. I did the following -

rpm -ivh kernel-2.6.15-1.2054-FC5.src.rpm
rpmbuild -bp --target=$(uname -m) /usr/src/redhat/SPECS/kernel-2.6.spec
The source files were installed in '/usr/src/redhat/BUILD/kernel-2.6.15/

But when I run my code i still see the same error "cannot find kernel source in /lib/modules/2.6.15-1.2054-FC5.

/lib/modules/2.6.15-1.2054-FC5.source -> build

/lib/modules/2.6.15-1.2054-FC5/build -> ../../../usr/src/kernels/2.6.15-1.2054-FC5-i686

Is there a way I can change the link from build to point to /usr/src/redhat/BUILD/kernel-2.6.15?
Thanks much.

bigrigdriver 02-18-2008 03:37 PM

When you build a .src.rpm, you do not end up with an installed rpm. What you get is a binary rpm somewhere in /usr/src/....., in a folder names RPMS (in uppercase letters). You then install that rpm in the usual maner.

thiagarn 02-18-2008 04:24 PM

Thx for ur reply.
I'm new to Linux.
In order to get this error fixed - "cannot find kernel source in /lib/modules/2.6.15-1.2054-FC5., what are the things i need to take care of?

I have tried some solutions but unfortunately they dont work.

Appreciate a response.

Thanks

bigrigdriver 02-18-2008 05:33 PM

From your previous posts, I see that you have run 'rpm -i' and 'rpmbuild' parts of working with .src.rpms. Now you need to go to /usr/src/redhat/RPMS and look down through the directories to find the rpm you made. Then you can 'rpm -i' your new rpm.

The place to look is something like /usr/src/redhat/RPMS/arch/i386 to find the rpm you made.

thiagarn 02-18-2008 06:06 PM

i could not fins any files in /usr/src/redhat/RPMS/arch/i386.

/usr/src/redhat/RPMS has the foll -

athlon i386 i486 i586 i686 noarch

All the folders have no files.

am i missing soemthing?

thiagarn 02-19-2008 01:15 PM

i could not find any files in /usr/src/redhat/RPMS/arch/i386.

/usr/src/redhat/RPMS has the foll -

athlon i386 i486 i586 i686 noarch

All the folders have no files.

am i missing something?

unSpawn 02-19-2008 02:13 PM

Like Simon Bridge already noted FC5 is obsolete and your kernel contains vulnerabilities. Please install Fedora 8 or choose another distro.

thiagarn 02-19-2008 02:17 PM

i'm doing a masters project on Honeynets. I'm sticking with FC5 just bcoz sebek tool (to capture attackers keystrokes) works with this version. Also i'm looking for vulnerabilities in the system so that i can capture attackers logs.
In this regard, can u give me suggestions for my previous post?

Thanks much.

thiagarn 02-19-2008 05:16 PM

I ran a piece of code. Getting this error - In order to get this error fixed - "cannot find kernel source in /lib/modules/2.6.15-1.2054-FC5.,Can anyone pls tell me what are the things i need to take care of to overcome this error?

And steps on how to install and build RPMS will be very helpful.

Thanks

unSpawn 02-19-2008 06:43 PM

Quote:

Originally Posted by thiagarn (Post 3062859)
I'm sticking with FC5 just bcoz sebek tool (to capture attackers keystrokes) works with this version.

I'm pretty much aware of what Sebek is, thanks. I just tried building Sebek Linux 2.6 Client 3.2.0b on CentOS-5 (custom 2.6.18 kernel) to see if it works and to help convince you you *can* migrate OK. If you get an error saying something like
Code:

net.c: error: ‘struct net_device’ has no member named ‘xmit_lock’
read this explanation about xmit_lock, edit xmit_lock references in Sebeks src/net.c, make clean, compile again. The build process ends OK and 'modinfo' sort of confirms that's a usable module. Could this convince you to move? If not then you'll have to concentrate on building the kernel using the link provided or How To Compile A Kernel - The Fedora Way if it's easier to read. The point is if you followed this or Simon Bridges doc after you 'rpm -bp kernel.spec' your source is in /usr/src/redhat/BUILD/kernel-2.6.15/somesubdirname. Say if you use the i386 version it will be /usr/src/redhat/BUILD/kernel-2.6.15/linux-2.6.15.i386 and you could (in theory) link that dir to /lib/modules/2.6.15-1.2054-FC5/build. BTW, where you say "While trying to run some code" what code are you talking about? Sebeks or your own?

thiagarn 02-19-2008 08:48 PM

Thanks.Yes, i'm configuring and installing sebek code.

My source is in /usr/src/redhat/BUILD/kernel-2.6.15/linux-2.6.15.i686
Can u tell me how to link that dir to /lib/modules/2.6.15-1.2054-FC5/build.?

Thanks

billymayday 02-19-2008 09:07 PM

Is there nn kernel-source package for Fedora? I'm not at a suitable box at the moment

thiagarn 02-19-2008 09:55 PM

yes i used kernel-2.6.15-1.2054_FC5.src.rpm from http://download.fedora.redhat.com/pu.../source/SRPMS/

i'm using kernel version 2.6.15-1.2054_FC5 i686.

Thanks


All times are GMT -5. The time now is 10:56 PM.