7.5.4. Upgrading your kernel
Most Linux installations are fine if you periodically upgrade
your distribution. The upgrade procedure will install a new kernel
when needed and make all necessary changes to your system. You
should only compile or install a new kernel manually if you need
kernel features that are not supported by the default kernel
included in your Linux distribution.
Whether compiling your own optimized kernel or using a
pre-compiled kernel package, install it in co-existence with the
old kernel until you are sure that everything works according to
plan.
Then create a dual boot system that will allow you to choose
which kernel to boot by updating your boot loader configuration
file grub.conf. This is a simple
example:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making config changes.
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, e.g.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hde8
# initrd /initrd-version.img
#boot=/dev/hde
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux new (2.4.9-31)
root (hd0,0)
kernel /vmlinuz-2.4.9-31 ro root=/dev/hde8
initrd /initrd-2.4.9-31.img
title old-kernel
root (hd0,0)
kernel /vmlinuz-2.4.9-21 ro root=/dev/hde8
initrd /initrd-2.4.9-21.img
|
After the new kernel has proven to work, you may remove the
lines for the old one from the GRUB config file, although it is
best to wait a couple of days just to be sure.