If I install the kernel source package, do I need the headers?
My normal practice, when a new kernel is released in testing, is to download all of the kernel packages & install them, as a backup, & also as a starting point for my customized kernel. I have a config file that I copy into the new sources & compile a custom kernel for my desktop & laptop. This is the kernel that I use on a regular basis. My question is: Since I have all the kernel source loaded, do I really need the header package? I have gotten along very well in the past without any kernel packages, if I compiled the kernel myself. Anyone have any ideas?
Regards, Bill |
I -think- that I recall reading someplace on the forums here about how you should never install kernel headers that are different from what your system was built against, to avoid having library issues. I never have myself and haven't had any problems with anything, but I'm no expert :)
|
Technicly no, but it's poor design. Pat put them in a seperate package for a reason.
regards, ...dkrstr |
sunman:
Quote:
Since there was a shiny new kernel package released yesterday, I think I will just put in the source, compile my kernel, get it working, remove everything else, then try to compile the nvidia drivers & a couple of other drivers I need & see what happens. I'll let you know. Regards, Bill |
OK, here is what I did.
1) Downloaded the most recent 2.6 series kernel in -current/extra. 2) Installed only the kernel source package. 3) Copied in my config files and ran 'make oldconfig', then 'make menuconfig'. (I take out a little more every time I go through one of these iterations, some day I'll have the resultant kernel down the way I want it.) 4) Ran 'make', then 'make modules_install'. 5) Copied the kernel files to /boot. 6) Booted several times to ensure that the new kernel worked, then modified my GRUB menu.lst file to boot automagically from the new kernel. 7) Removed any traces of old kernels/kernel packages. 8) Compiled the nvidia driver module. This process gave me a warning I hadn't seen before, but no errors & the driver works well, so no problem. 9) Compiled the kqemu module for this kernel. This worked normally, no hassles. As a relult of the above tests, I think I'll not load any further kernel modules & just see how things work. Regards, Bill |
Make sure to keep the original header package installed or you will run into problems compiling programs later down the road. That is, unless you want to recompile GCC and glibc for your new kernel version.
regards, ...drkstr |
I am running a 2.6.17.9 kernel I compiled, but I still have my 2.6.16.9 kernel headers I got from /testing a whing ago. I uninstalled them on my other machine and something broke (this was back in January) so I have just left them there in case.
What exactly do the headers do? |
drkstr:
Quote:
hsimah Quote:
Regards, Bill |
You need to keep the 2.4.x headers installed. The headers are used by GCC when compiling programs and it will expect to find the headers it was compiled against. If you need to compile something specific to your kernel (such as a kernel modules), it will look for the headers installed in the /usr/src/linux-<version>. The most common method is to follow the link '/lib/modules/<version #>/source'. However, If you are compiling a regular program, it will usually look for headers GCC was compiled against in /usr/include/linux (IE. The headers package).
regards, ...drkstr |
Ok, now I understand. I wasn't aware that two different paths could be followed. I will put the 2.4 series headers back in. Thank you for enlightening my ignorance.
Regards, Bill |
Actually, the kernel-headers package that should be installed is the one matching the kernelt that was present when glibc was compiled, not gcc.
The result is the same--do not replace the 2.4.x kernel headers even tho' you might be using a 2.6.x kernel. I have no idea what that one person did to make the nVidia drivers not compile correctly, since I've (within the last week) installed the latest nVidia driver on both a 10.2 box and a -current box running kernel 2.6.17.11. |
Yes, I mentioned that in my earlier post, but if you want to get technical, your entire "toolchain" (binutils, gcc, & glibc) should be compiled against the same kernel headers.
http://www.linuxfromscratch.org regards, ...drkstr |
Thanks, folks, I appreciate the help.
Regards, Bill "me, I just bear up to my bewilderedness.." Lyle Lovett, "Bears" |
All times are GMT -5. The time now is 12:00 PM. |