Making sure the boot loader configuration file has been correctly modified is a crucial step. If the file is modified incorrectly, the system may not boot into Red Hat Linux. If this happens, boot the system with the boot diskette created earlier and try configuring the boot loader again. If the boot diskette does not work, refer to Chapter 9 for more information about rescue mode.
In order to provide a redundant boot source to protect from a possible error in a new kernel, keep the original kernel available.
If GRUB is the boot loader, the new-kernel-pkg script should have modified /boot/grub/grub.conf to include a section for the new kernel.
The default GRUB configuration file looks similar to the following:
# NOTICE: You have a /boot partition. This means that # all kernel paths are relative to /boot/ default=0 timeout=30 splashimage=(hd0,0)/grub/splash.xpm.gz title Red Hat Linux (2.4.20-2.47.1) root (hd0,0) kernel /vmlinuz-2.4.20-2.47.1 ro root=/dev/hda3 initrd /initrd-2.4.20-2.47.1.img |
If a separate /boot partition exists, the paths to the kernel and initrd image are relative to the /boot partition.
By default, Red Hat Linux uses Red Hat Linux and the kernel version in parentheses to differentiate between different kernels for GRUB to boot. In our example, the new /boot/grub/grub.conf file created by the new-kernel-pkg script would look like the following:
# NOTICE: You have a /boot partition. This means that # all kernel paths are relative to /boot/ default=1 timeout=30 splashimage=(hd0,0)/grub/splash.xpm.gz title Red Hat Linux (2.4.20-2.47.1custom) root (hd0,0) kernel /vmlinuz-2.4.20-2.47.1custom ro root=/dev/hda3 initrd /initrd-2.4.20-2.47.1custom.img title Red Hat Linux (2.4.20-2.47.1) root (hd0,0) kernel /vmlinuz-2.4.20-2.47.1 ro root=/dev/hda3 initrd /initrd-2.4.20-2.47.1.img |
Notice that the default boot entry is set to 1. The script does not change the default kernel to boot; it only adds a new section for the new kernel.
If the file is not modified correctly and no error messages were shown during the make install step, add the new section manually.
After rebooting, selecting the new kernel from the list, and seeing that the new kernel works, make the new kernel the default. Either place its section first or change the default entry number to the appropriate number (remember that it starts counting with 0). For GRUB, no commands need to be run after modifying the configuration file.
If LILO is the boot loader, the new-kernel-pkg script should have modified /boot/lilo.conf to include a section for the new kernel and run /sbin/lilo.
The default LILO configuration file looks similar to the following:
prompt timeout=50 default=linux boot=/dev/hda map=/boot/map install=/boot/boot.b message=/boot/message lba32 image=/boot/vmlinuz-2.4.20-2.47.1 label=linux initrd=initrd-2.4.20-2.47.1.img read-only append="root=LABEL=/" |
The modified /etc/lilo.conf should look similar to the following:
prompt timeout=50 default=linux boot=/dev/hda map=/boot/map install=/boot/boot.b message=/boot/message lba32 image=/boot/vmlinuz-2.4.20-2.47.1custom label=2.4.20-2.47.1custom initrd=initrd-2.4.20-2.47.1custom.img read-only append="root=LABEL=/" image=/boot/vmlinuz-2.4.20-2.47.1 label=linux initrd=initrd-2.4.20-2.47.1.img read-only append="root=LABEL=/" |
If the file is not modified correctly and no error messages were shown from the make install step, add the new section manually.
To activate the changes, run the command /sbin/lilo -v. If all goes well, the output should be similar to the following:
LILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger 'lba32' extensions Copyright (C) 1999,2000 John Coffman Reading boot sector from /dev/hda Merging with /boot/boot.b Mapping message file /boot/message Boot image: /boot/vmlinuz-2.4.20-2.47.1custom Added 2.4.20-2.47.1custom * Boot image: /boot/vmlinuz-2.4.20-2.47.1 Added linux Writing boot sector. |
Be sure the messages contains Writing boot sector. The * after linux means that the section labeled linux is the default kernel that LILO will boot.
From now on, when the system boots the the old and new entries are listed.
To boot the new kernel, select it and press
Begin testing the new kernel by rebooting the computer and watching the messages to ensure the hardware is detected properly. If it is successful, change LILO to boot the new kernel by default by changing the label after default= in the configuration file and running the command lilo -v.