Grub

Since its emergence, the Grand Unified Boot Loader (GRUB) has become the de facto boot loader for Linux on the PC for several reasons:

■ It allows the user to have much more granular control over the configuration of the boot loader as well as the boot process as a whole.

■ GRUB requires that the MBR be updated only once — when installing the bootstrap for GRUB. All GRUB boot configuration data is read directly from the GRUB configuration file, /etc/grub.conf. This eliminates the need to execute a command to refresh the boot loader after making any changes to its configuration file.

■ GRUB provides advanced features for logically swapping and hiding partitions, which can be very useful in multiboot environments or for security purposes.

■ All of the options for the boot process can be edited from the GRUB boot loader during the boot process. This enables you to make one-time modifications to the boot process when diagnosing or correcting problems. With LILO, if you made a configuration error in your boot configuration file, your system would not boot. With GRUB, you can temporarily make configuration changes to fix those problems and continue booting the system.

■ GRUB can read the filesystem: this means that if the system fails to boot because the location of the kernel, initrd, or root partition has changed, you can do a one-time edit of GRUB's configuration before the system boots from the GRUB prompt.

All of these features have managed to make GRUB the boot loader of choice in most modern Linux distributions.

The primary GRUB configuration file is /etc/grub.conf. The grub.conf file is very similar to LILO's lilo.conf configuration file in that it provides both general boot loader configuration settings and specific booting options for operating systems. In SUSE, the configuration of GRUB is actually controlled via the file /boot/grub /menu.lst. If you examine the /etc/grub.conf file, you will see that it performs some initial setup and then passes control to the /boot/grub/menu.lst file. The /etc/grub.conf file and SUSE's /boot/grub/menu/lst file, therefore, support exactly the same commands and syntax because the /boot/grub/menu.lst file is simply a SUSE extension to the more standard /etc/grub.conf file. Listing 4-3 shows a simple example of a SUSE /boot/grub/menu.lst file.

Was this article helpful?

0 0

Post a comment