Chapter 3: GRUB


As you saw in the previous chapter, in order for a Red Hat Linux system to boot properly, a boot loader — typically either GRUB or LILO — must be invoked in order for the operating system to be loaded and initialized. The default boot loader for Red Hat Linux 8.0 is GRUB, the GRand Unified Boot loader. In addition to loading the Red Hat Linux operating system, GRUB allows for multiple boot options to be configured. For example, GRUB can be used in a dual-boot situation, where both Red Hat Linux and another operating system like Windows are available. GRUB can also be used to pass boot-time arguments to the kernel.

Note

GRUB is typically used only on Intel-compatible x86 architectures. If your architecture differs, see the available documentation at http://www.redhat.com.

GRUB and the x86 Boot Process

This section discusses the specific role GRUB plays when booting an x86 system. For a detailed look at the overall boot process, see Chapter 2. GRUB loads itself into memory in the following stages:

  1. The Stage 1 or primary boot loader is read into memory by the BIOS from the MBR1. The primary boot loader exists on less than 512 bytes of disk space within the MBR. The only thing it does is load the Stage 1.5 or Stage 2 boot loader.

  2. The Stage 1.5 boot loader is read into memory by the Stage 1 boot loader only if necessary. Some hardware requires an intermediate step to get to the Stage 2 boot loader. This is sometimes true when the /boot partition is above the 1024-cylinder head of the hard drive or when using LBA mode. The Stage 1.5 boot loader is found either on the /boot partition or on a small part of the MBR and the /boot partition.

  3. The Stage 2 or secondary boot loader is read into memory. The secondary boot loader displays the GRUB menu and command environment. This interface allows you to select which operating system or Linux kernel to boot, pass arguments to the kernel, or look at system parameters, such as available RAM.

  4. The secondary boot loader reads the operating system or kernel and initrd into memory. Once GRUB determines which operating system to start, it loads it into memory and hands control of the machine to that operating system.

The boot method used to boot Red Hat Linux is called the direct loading method because the boot loader loads the operating system directly. There is no intermediary between the boot loader and the kernel.

Cross-Reference

For more on the system BIOS and the MBR, see Chapter 2.

The boot process used by other operating systems may differ. For example, Microsoft’s DOS and Windows operating systems, as well as various other proprietary operating systems, are loaded using a chain loading boot method. Under this method, the MBR simply points to the first sector of the partition holding the operating system. There it finds the files necessary to actually boot that operating system. GRUB supports both direct and chain loading boot methods, allowing it to boot almost any operating system.

Warning

During installation, Microsoft’s DOS and Windows installer completely overwrites the MBR, destroying any existing boot loader. If creating a dual-boot system, it is best to install the Microsoft operating system first.




Official Red Hat Linux Administrator's Guide
Official Red Hat Linux Administrators Guide
ISBN: 0764516957
EAN: 2147483647
Year: 2002
Pages: 278
Authors: Red Hat Inc

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net