|
Basic Linux TrainingLesson 8: Rebuilding the Kernel and Using Modules
Table of ContentsRebuilding the KernelThe 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
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.
Using ModulesMore 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 zImagethen install the kernel modules make modules ; make modules_installreboot to take advantage of the new kernel and you're ready to go.
AssignmentsTextbook: Running Linux
Terms and Concepts: Define and add these to your glossary:
Online:
And for those interested in hacking
http://home1.gte.net/henryw/basic/basic08.htmlCopyright © 1997, 1998 Henry
White. All Rights Reserved. |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |