SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Why this need for kernel headers?
I succeed in compile a custom kernel module for 2.6 with kernel header pakage for 2.4.22 (just because they're not used but include come from /lib/modules/$(uname -r)/build instead).
It is not a problem have these header files installed. But make sure to not make a confusion between kernel-sources and kernel-header package, only the first is update needed and is important, the second are more or less standart include files and if program need accurate kernel header, it will find them in /lib/modules/$(uname -r)/build/include
Find a slackware mirror, find testing/kernel-headers-2.6.7-i386-1.tgz or whatever its called, and simply wget and upgradepkg it.
But usually its not a good idea to upgrade kernel-headers as everything will work just fine anyway. Pat V. posted a nice warning in the testing/ subdirectory concerning upgrading the headers. It stopped me heh It comes down to "if you don't have any specific reason you need it, leave it."
I think the kernel headers are needed to install nvidia's binary drivers. I have tried upgrading my kernel before but I couldn't get the video driver to install. If I install the kernel from source can I use the kernel-headers package in /testing as long as the versions are matched?
I should think so, I've used the 2.6 series kernels with the 2.4 series headers with nVidia's drivers for ages though, so I don't think the versions have to match. I upgraded my kernel headers a few minutes ago, I'll recompile the nVidia module and tell you how it goes
Software for your system should be compiled using the same headers as were used to compile the glibc for your system, not against the headers for the kernel you are running. glibc is the 'mother' of the whole system -not the kernel. Often, glibc is compiled against kernel headers for a completely different version of the kernel than what the system runs -even when starting from scratch. kernel-headers should only be upgraded when glibc is upgraded and the new kernel-headers should be exactly the same headers as used to compile glibc with.
Linking /usr/src/linux to the current kernel sources is convenient for compiling external kernel modules which need to know which kernel sources to use -they often will simply use /usr/src/linux -otherwise, they will use 'uname' to figure out which kernel is running and then llok for the link /lib/modules/$KVERS/build to tell them where the current kernel sources are.
*But*, this refers to building out-of-tree kernel modules and not to building regular software. When building regular software, they look for the kernel headers under /usr/include/linux which is where the headers in the kernel-headers package are installed. Again, only upgrade the kernel-headers package when upgrading glibc.