Troubleshooting the Boot Loader

The boot loader associated with Red Hat Enterprise Linux 5 is GRUB. For an extensive discussion, see Chapter 3. It can help you to know how to:

Associate the root directive with the partition with the /boot directory.

Boot into the desired, non-default runlevel.

Access the GRUB command line.

Test different GRUB commands.

Use command completion to find and use the exact names of your kernel and initial RAM disk.

For this exercise, you'll need a partner. Have your partner make changes to your system. As your partner works to create a network problem for you to solve on your computer, look away until the computer is rebooting.

It's most helpful if you have a VMware snapshot of your RHEL system. Problems like those created in this exercise have caused administrators to mess up their systems in other ways. You'll also need the first RHEL installation CD.

Back up the configuration file associated with the boot loader, /boot/grub/grub.conf. Make sure to back up this file to a non-standard location, in case your partner also backs up any files before changing them.

Open the /boot/grub/grub.conf configuration file in a text editor. Focus on the kernel command line, which might look like one of the following:

kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/VolGroup00/LogVol00

or

kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/

Introduce a typographical error in the root directive in the kernel command line.

Reboot the system, and let your partner back at the computer. Tell him or her to address the error message shown. Give your partner the first RHEL 5 installation CD.

Make sure to tell your partner to back up any files that he or she might change to the appropriate home directory.

Whatever happens, restore the original /boot/grub/grub.conf configuration file when your partner is finished with this exercise. (Alternatively, you can restore the configuration from a VMware snapshot.)