PDA

View Full Version : No kernel source files in /usr/src/kernels/ directory


UK2
17th April 2010, 06:29 PM
Hello,

I am using Fedora 13 Beta. 2.6.33.2-41.fc13.i686

I have downloaded virtual box and when I try and install it. It tells me it needs the kernel source files. In my directory /usr/src/kernels/ is empty.

However, the 2.6.33 kernel was install as an update that I ran. I am wondering why the source files are not there when yum installed the latest kernel.

If this is not the case how can I get the rpm package myself to install the kernel source files?

Many thanks for any suggestions,

CSchwangler
17th April 2010, 06:42 PM
Fedora 13 does not contain the kernel sources, see here

https://fedoraproject.org/wiki/Docs/Beats/Kernel

UK2
17th April 2010, 07:15 PM

Hello,

Thanks for the reply.

Just a few questions.

Before I read your post I had downloaded the kernel 2.6.33 from kernels.org. There I extracted it and then setup a symbolic link in the /usr/src/ directory i.e. So, after extracting this will contain all the source files I need?

kernels -> linux-2.6.33.2

Would that be correct using the symbolic link?

However, I then read your post and installed the kernel-devel package i.e.
sudo yum install kernel-devel.i686

I removed the symbolic before I installed it.

Now I have the following directory:
/usr/src/kernels/2.6.33.2-41.fc13.i686

However, I could see the include directory, but the lib directory didn't have any libraries in it? Would that be correct?

Many thanks for your advice,

bob
17th April 2010, 08:36 PM
(moved to F13 Development)

smr54
17th April 2010, 10:44 PM
Hrrm, looking at the Fedora link CSchwangler provided, it seems to me that they're making a very simple thing more complex than it is, as well as not even giving the necessary information.


If you have the i686 kernel, chances are that it runs the PAE kernel by default. Rather than using the vanilla kernel, you're usually better off, when using Fedora, to use its own kernel packages.

Do

uname -r

If it has the letters PAE in it, then do

yum install kernel-PAE-devel

Actually, probably better off doing yum update linux-kernel, and if a later kernel is available, reboot into it, then do yum isntall kernel-PAE-devel, to make sure that there are no version mismatches. (I'd also remove the links you've already created to avoid conflicts.)

Then you're done, almost no muss, fuss, or bother.

jpollard
17th April 2010, 10:50 PM
I believe the /usr/src/kernels directory tree is for kernel includes used in driver
development or drivers compiled external to the kernel. These should be
the kernel headers that are also used during the development/compilation of libc.

It isn't where the kernel source files go - that is for compilation as a user, but then
the installation of the kernel is done as root.

johabba
18th April 2010, 12:32 PM
I've installed the kernel-devel rpm, but packages like NVIDIA's driver and vmware cannot find it. Is this a change from FC12, 10, 11, 9, etc....?

smr54
18th April 2010, 02:09 PM
It shouldn't be.

Please post the output of

rpm -qa|grep kernel

and

uname -r

noairbag
20th April 2010, 01:39 PM
Trying to install vmware tools and encountered the same issue. Output requested below:

[root@xxx /]# rpm -qa|grep kernel
kernel-devel-2.6.33.2-41.fc13.i686
kernel-PAE-devel-2.6.33.1-24.fc13.i686
kernel-2.6.33.2-41.fc13.i686
kernel-PAE-devel-2.6.33.2-41.fc13.i686
kernel-PAE-2.6.33.2-41.fc13.i686
kernel-headers-2.6.33.2-41.fc13.i686
abrt-addon-kerneloops-1.0.8-3.fc13.i686
kernel-PAE-2.6.33.1-24.fc13.i686

[root@xxx /]# uname -r
2.6.33.2-41.fc13.i686.PAE