Introduction to Linux Kernel Management
At the heart of the SLES operating system is the Linux kernel. As mentioned in the "SLES Startup Procedures" section of this chapter, the Linux kernel is found in the
/boot
directory and is typically named
vmlinuz-<
kernel version
>
. The default kernel with an OES Linux installation is version 2.6.5-7.112-default. The kernel version number can actually be divided into the following three important
NOTE
The
The most common administrative task relating to the kernel is most likely applying kernel updates to resolve security issues. Applying kernel updates through the YaST Online Update or Red-Carpet tools is a very straightforward process, but if problems are
Table 6.5 outlines the important kernel-related files found within the /boot directory. Table 6.5. Important Kernel-Related Files in /boot
NOTE As mentioned in Table 6.5, the GRUB bootloader is typically configured to load both the kernel and the initrd image using the symbolic links rather than the actual filenames. This is normally a good thing, but if a kernel patch fails to properly configure these links, the bootloader process will be unable to locate these important files and the boot process will fail. Kernel Sources
Compiling your own Linux kernel is not
Even though compiling a custom kernel is not a good idea for a production server, there are a number of reasons why you might want to install the kernel source code. One example might be that a custom program you need to compile requires the kernel source to be installed. An even better example is the potential ability to look through the kernel source code to help track down error messages and their causes.
Using the
grep
command to search for a specific error message within the kernel source code tree can often lead to the exact error message. When you find the code
In order to use kernel sources in this manner, the kernel-source package must be installed. This package is not typically selected for installation using the default configurations, but can be easily installed after the initial installation. When installed, the Linux kernel source code is located in the /usr/src/linux directory structure. Working with Kernel Modules
When the Linux kernel is built, it must be built in such a way as to support as much third-party hardware as possible. There are
The second and more common method of building the kernel is compiling a kernel with internal support for common hardware
When using external modules, the system must be configured to load the appropriate hardware modules upon system startup. During the installation of SLES, the installation routine will scan and detect hardware devices and build the initrd image with the required modules. However, when adding hardware after the installation or when installing proprietary drivers for unsupported hardware, it may be necessary to configure the server manually. Table 6.6 lists commands used to manage kernel modules. Table 6.6. Commands and Files Used with Kernel Modules
After you have used the utilities listed in Table 6.6 to load and test a required hardware module, you must configure your server to automatically load the module upon server restart. This can be accomplished by adding the module to the MODULES_LOADED_ON_BOOT directive of the /etc/sysconfig/kernel file, or the module can be added to the /etc/modprobe.conf.local file.
NOTE
If you have a complex loading requirement, such as the specific ordering of more than one module, the
/etc/modprobe.conf.local
file is much more flexible than
/etc/sysconfig
. For more information on the syntax of this file,
|