Table of Contents
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, you will 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 will remain 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.
Several Makefiles are provided with the kernel to automate the process. Select the hardware settings and other kernel features. As 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.
To install an official SUSE update kernel, download the update RPM from the SUSE FTP server or a mirror like ftp://ftp.gwdg.de/pub/linux/suse/. 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 /boot/vmlinuz.old cp /boot/initrd /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 ramdisk”. Therefore, use the command mk_initrd to write the new initial ramdisk. 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 Chapter 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.