The cutover from lilo to grub has produced the
predictable complaints from people comfortable with the prior
bootload manager. In part this is due to the somewhat
partial nature of developer provided documentation and
usage examples within the FSF package.
The FSF scope of coverage on operating systems, architectures
and bootimage sources is much more ambitious than lilo --
all the 'Free' variants, and several of the commercials; network
based booting (a la' syslinux for Intel PXE); and
The customary checklist to follow might be:
Make sure grub is installed. If not, using yum,
for example, type:
yum -y install grub
Edit the grub.conf and device.map files to taste.
In Red Hat Linux, thess files live in: /boot/grub/ with permissions 700. We have an
example below. The device.map lists the sequence in
which devices are consulted for the bootloader bootstrap code.
MAKE a backup recovery floppy. The specifics are beyond the
scope of this outline, but it usually looks like:
mkbootdisk -v 2.4.18-27.8.x
We use the -v verbose option, so a failed format, or other
image creation error is more evident. If the media looks like
it has problems, mark and discard it from the production stream
at once; we snap bad floppies in half, so we don't grab one
by mistake. ;)
LABEL the recovery floppy; Hostname, description as 'recovery
floppy', creation date, kernel variant, root
partition, distribution, and admin's initials are appropiate
for the floppy label.
TEST the recovery floppy. Hands off. Sitting across the room.
Okay. Now we get to work. Move the old /etc/lilo.conf
based file away.
mv /etc/lilo.conf /etc/lilo.conf_
Install the bootsector selection code for the
/boot/grub/grub.conf to use:
(obviously, perhaps, /dev/sda would be used with a SCSI
Look for errors. A successful install will look like this:
[root@hostname root]# grub-install /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script 'grub-install'.
# this device map was generated by anaconda
Time for the acid test. Reboot it and again, watch from across the
Diagnosis of the cause of any failure, and recovery from failed
grub at this point usually boil down to reading the info
pages, and the error messages on the screen, and doing whatever is
needed to remove them. Media errors are of course
outside of the scope of what grub handles.
# grub.conf generated by anaconda -- note: editted manually later
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,5)
# kernel /boot/vmlinuz-version ro root=/dev/hda6
# initrd /boot/initrd-version.img
# start the #0 entry if possible
# or fall back to the #1 backup if not
title Red Hat Linux (2.4.7-10)
# kernel /boot/vmlinuz-2.4.7-10 ro root=/dev/hda1
# IDE CD burner on SEcondary Master ...
kernel (hd0,0)/vmlinuz-2.4.7-10 ro root=/dev/hda3 hdc=ide-scsi
# title DOS
# rootnoverify (hd1,0)
# chainloader +1