Search This Blog

Wednesday, December 30, 2009

Instaling a Kernel RPM

# yum install kernel
# rpm -ivh kernel-

Installing a new kernel is one of the few things you will do on your system that requires a reboot of the system. It also requires a little more thought and caution, as it is quite simple to render a system temporarily inoperable if you are careless when updating the kernel. Unlike just about any other upgrade you might do, you should NOT upgrade the kernel using rpm -U or -F.


Recall how rpm functions when upgrading: it determines whether a version already exists on the system, and if so, whether the version to be installed is newer. If it is newer, rpm first installs the new version, thereby replacing old files -- except those marked as configuration files. It then removes the old package, but only deletes files that do not exist in the new version.


Because -U and -F removes the previous kernel version, if your newly-installed kernel proves unstable, you could be left with an unbootable system. You would have to resort to alternate boot media such as a boot floppy or the CD-ROM. When you run an install instead of an upgrade, the old version of the kernel is still available and can be selected from the bootloader. yum knows to perform an “install” rather than an “upgrade” when working with a kernel package, whether you use yum update or yum install.


Because all of the kernel files are version-specific (that is, they either include version details in their names or are stored in version-specific paths), it is possible to install multiple versions of the kernel package. In addition, kernel modules are version-specific, and installation of a new kernel will require re-installation of any add-on kernel modules (not contained in the base package). Missing kernel modules can leave the system unable to dynamically load device drivers or other functions.


By default, the new kernel is automatically added to GRUB and made the default. You can change this behavior by editing /etc/sysconfig/kernel.

No comments: