Basic Linux Training
Lesson 8: Rebuilding the Kernel and Using Modules
Table of Contents
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.patchlevelwhich you will see each time you login, and can easily confirm with the command
uname -aEven 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.
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 zImagethen install the kernel modules
make modules ; make modules_installreboot to take advantage of the new kernel and you're ready to go.
Terms and Concepts:
Define and add these to your glossary:
And for those interested in hacking
Copyright © 1997, 1998 Henry
White. All Rights Reserved.
With any suggestions or questions please feel free to contact us