Chapter 8. The Linux Kernel

Table of Contents

8.1. Kernel Update
8.2. Kernel Sources
8.3. Kernel Configuration
8.4. Kernel Modules
8.5. Settings in the Kernel Configuration
8.6. Compiling the Kernel
8.7. Installing the Kernel
8.8. Cleaning Your Hard Disk after Compilation


The kernel manages the hardware of every Linux system and makes it available to the various processes. Although the information provided in this chapter will not make you a kernel hacker, learn how to perform a kernel update and how to compile and install a custom kernel. If you follow the instructions in this chapter, the previous kernel remains functional and can be booted if necessary.

The kernel that is installed in the /boot directory is configured for a wide range of hardware. Normally, there is no need to compile a custom kernel, unless you want to test experimental features and drivers.

Often the behavior of the installed kernel can be modified by means of kernel parameters. For example, the parameter desktop sets shorter time slices for the scheduler, resulting in a subjective acceleration of the system. Information is available in the kernel documentation in the directory /usr/src/linux/Documentation, assuming the package kernel-source is installed.

Several Makefiles are provided with the kernel to automate the process. Select the hardware settings and other kernel features. Because you need to know your computer system pretty well to make the right selections, modifying an existing and working configuration file is recommended for your first attempt.

8.1. Kernel Update

To install an official SUSE update kernel, download the update RPM from the SUSE FTP server or a mirror like To determine the version of your current kernel, look at the version string with cat /proc/version. Alternatively, check to which package the kernel (/boot/vmlinuz) belongs with rpm -qf /boot/vmlinuz.

Before installing this package, make a backup copy of the original kernel and the associated initrd. As root, enter the following two commands:

cp /boot/vmlinuz-$(uname -r) /boot/vmlinuz.old
cp /boot/initrd-$(uname -r) /boot/initrd.old 

Then install the new kernel with the command rpm -Uvh <packagename>. Replace packagename with the name of the kernel RPM to install.

Since SUSE LINUX 7.3, reiserfs is the standard file system. It requires the use of an initial RAM disk. Therefore, use the command mk_initrd to write the new initial RAM disk. In current SUSE LINUX versions, this is done automatically when installing the new kernel.

To be able to boot the old kernel, configure the boot loader accordingly (for more information, refer to 7. Booting and Boot Managers). Finally, reboot to load the new kernel.

To reinstall the original kernel from the SUSE LINUX CDs, the procedure is almost the same, except you copy the kernel RPM from the directory boot on CD 1 or the DVD. Now, install as described above. If you receive an error message saying that a newer kernel rpm is already installed, add the option --force to the above rpm command.