LILO
LILO (current version is 21.7.5) was the first Linux boot loader, and its name simply stands for “LInux LOader.” You will never need to download it because all Linux distributions come with it.
LILO (current version is 21.7.5) was the first Linux boot loader, and its name simply stands for “LInux LOader.” You will never need to download it because all Linux distributions come with it.
Let's take a look at an example lilo.conf file:
boot=/dev/hde
map=/boot/map
install=/boot/boot.b
vga=ext
default=linux
lba32
prompt
timeout=50
password=secret
restricted
message=/boot/message-graphic
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label=linux
root=/dev/hde1
initrd=/boot/initrd.img
append=" hdb=ide-scsi"
read-only
image=/boot/vmlinuz
label=failsafe
root=/dev/hde1
initrd=/boot/initrd.img
append=" hdb=ide-scsi failsafe"
read-only
other=/dev/fd0
label=floppy
unsafe
image=/boot/vmlinuz-2.2
label=linux2.2
root=/dev/hde1
initrd=/boot/initrd-2.2.img
append=" hdb=ide-scsi"
read-only
boot=/dev/hde
map=/boot/map
install=/boot/boot.b
vga=ext
default=linux
lba32
prompt
timeout=50
password=secret
restricted
message=/boot/message-graphic
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label=linux
root=/dev/hde1
initrd=/boot/initrd.img
append=" hdb=ide-scsi"
read-only
image=/boot/vmlinuz
label=failsafe
root=/dev/hde1
initrd=/boot/initrd.img
append=" hdb=ide-scsi failsafe"
read-only
other=/dev/fd0
label=floppy
unsafe
image=/boot/vmlinuz-2.2
label=linux2.2
root=/dev/hde1
initrd=/boot/initrd-2.2.img
append=" hdb=ide-scsi"
read-only
GRUB
GRUB is a newer boot loader that at one point was a little more advanced than LILO. Its name stands for GRand Unified Bootloader. I find GRUB a little more difficult to use than LILO, and it is no longer any more advanced than LILO is. It offered a graphical boot menu before LILO did, and it was a text ANSI-based menu at that. Now, LILO offers a true graphical boot menu and is just as powerful, if not more so, than GRUB.
GRUB works in a very different way. It comes with an interactive script called grub-install, which is how you should initially configure it, unless you really know what you're doing. You will need to have GRUB installed first; most distributions also come with GRUB, but if not, you can download it from the GNU.org site.
To begin the configuration, issue the following as root:
grub-install /dev/hde
where /dev/hde is the primary drive to boot from. Again, /dev/hde is the primary ATA100 drive, but if you use ATA33 or ATA66 drives, be sure to use /dev/hda.
Once grub-install runs for the first time, it will create a file called /boot/grub/device.mapand will print the contents of that file to the screen. This will list all of the drive devices on your system, including your floppy drive. After running grub-install here, my/boot/grub/device.map file looked like Table A.
If this looks correct, you will then need to create the GRUB configuration file:/boot/grub/menu.lst
To begin the configuration, issue the following as root:
grub-install /dev/hde
where /dev/hde is the primary drive to boot from. Again, /dev/hde is the primary ATA100 drive, but if you use ATA33 or ATA66 drives, be sure to use /dev/hda.
Once grub-install runs for the first time, it will create a file called /boot/grub/device.mapand will print the contents of that file to the screen. This will list all of the drive devices on your system, including your floppy drive. After running grub-install here, my/boot/grub/device.map file looked like Table A.
| (fd0) | /dev/fd0 |
| (hd0) | /dev/hde |
| (hd1) | /dev/hdf |
| (hd2) | /dev/hdgThe device.map file |
If this looks correct, you will then need to create the GRUB configuration file:/boot/grub/menu.lst
| Example configuration file |
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/rootvg/root_lv
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-67.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-67.EL ro root=/dev/rootvg/root_lv rhgb quiet
initrd /initrd-2.6.9-67.EL.img
No comments:
Post a Comment