Rebuilding the Kernel

The kernel you used to boot during the installation was designed to support only the minimal hardware needed to get Linux installed. You will find that this kernel does not have support for some of your hardware. Traditionally, you would have to rebuild the kernel to include that support - which requires three keys

you have the kernel source code gcc is installed you know which changes you need to make in your custom kernel

All that eats up a lot of real estate on your hard disk. If you have a minimal installation on a small partition you will not be able to do much about it.

Kernel rebuilding is an important skill, especially for system administrators, and not difficult to learn.

Sometimes you will have to upgrade the kernel to take advantage of a new version of other software - the compiler, libraries, or X applications, for example. Remember, that kernel development is being done daily, and although you do not need to be overly concerned with staying up to date with the very latest kernel, it costs you nothing but time and effort. As with any skill, the more often you practice, the quicker you will become proficient at it.

The numbering convention is

major.minor.patchlevel

which you will see each time you login, and can easily confirm with the command

uname -a

Even numbered minor levels are stable releases that contain only bug fixes but no new features; stick with this if you're most interested in getting things done and don't want to mess around with the operating system any more than is absolutely necessary. Odd numbered minor levels are development releases and contains new code that has not been thoroughly debugged; here's a built-in opportunity if you want to learn more than you really need to know; use this only if you are a programmer and are willing and able to put up with a lot of maintenance.

Most of you who have recently installed Linux by CD-ROM will have patchlevel 29 to 32. The procedure for downloading and installing the latest patches is not complicated - save your previous kernel tree directory before you untar the patches, and apply the patches individually in numerical order.

Using Modules

More recent development of the kernel has provided support for modules so that rather than recompiling the kernel you can edit /etc/rc.d/rc.modules to add the hardware support by simply removing the pound sign (#) in front of the line that applies to the device you want to include (and adding any additional information needed by the kernel module). Reboot and you should have the support.

These modules will be found in the directory named for the kernel currently installed, for example /lib/modules/2.0.30.

Remember, if you are using kernel modules, you will have to reinstall them when you upgrade your kernel. You do this by specifying M (to build selected drivers as modules) rather than Y (building them into the kernel). Compile your kernel as you would normally

make dep ; make clean ; make zImage

then install the kernel modules

make modules ; make modules_install

reboot to take advantage of the new kernel and you're ready to go.

This Website is hosted by :

Back to the main page