Chapter 7. Booting and Boot Managers

Table of Contents

7.1. The Boot Process
7.2. Boot Management
7.3. Selecting a Boot Loader
7.4. Booting with GRUB
7.5. Configuring the Boot Loader with YaST
7.6. Uninstalling the Linux Boot Loader
7.7. Creating Boot CDs
7.8. Troubleshooting
7.9. For More Information


This chapter describes the boot process of your Linux system. Learn how to configure GRUB, the boot loader currently used in SUSE LINUX. A special YaST module is available for performing all settings. If you are not familiar with the subject of booting in Linux, read the following sections to acquire some background information. This chapter also describes some of the problems frequently encountered when booting with GRUB and their solutions.

7.1. The Boot Process

During the boot process, the system control passes from the BIOS to the boot loader to the operating system kernel in a three-stage process. After switching on the computer, the BIOS initializes the screen and the keyboard and tests the main memory. Up to this stage, the machine does not have access to any mass storage media. Subsequently, the information about the current date, time, and the most important peripherals are loaded from the CMOS values (CMOS Setup). When the first hard disk and its geometry is recognized, the system control passes from the BIOS to the boot loader.

The first physical 512-byte data sector of the first hard disk is loaded into the main memory and the program (the boot loader) at the beginning of this sector takes over. The sequence of the commands executed by the boot loader determines the remaining part of the boot process. Therefore, the first 512 bytes on the first hard disk are referred to as the Master Boot Record. Up to the point when the MBR is loaded, the boot process is the same on all computers regardless of the installed system and the computer only has the routines (drivers) stored in the BIOS for accessing peripheral devices.

Subsequently, the boot loader configuration determines which operating system should be booted with which options. In the final stage, the boot loader passes the system control to the actual operating system. As soon as the control passes to the operating system, all drivers contained in the operating system are available to support your hardware.

7.1.1. Master Boot Record

The structure of the MBR is defined by an operating system–independent convention. The first 446 bytes are reserved for program code. The next 64 bytes provide space for a partition table of up to four entries (see 3.9. “Partitioning for Experts”). The partition table contains information about the partitioning of the hard disk and the file system type. The operating system needs this table for handling the hard disk. The last two bytes of the MBR must contain a static “magic number” (AA55). An MBR containing a different value is regarded as invalid by the BIOS and all PC operating systems.

7.1.2. Boot Sectors

Boot sectors are the first sectors of hard disk partitions except for the extended partition, which merely serves as a “container” for other partitions. These boot sectors have 512 bytes of space for code used to boot an operating system installed in the respective partition. This applies to boot sectors of formatted DOS, Windows, and OS/2 partitions, which also contain some important basic data of the file system. In contrast, the boot sectors of Linux partitions are initally empty after setting up a file system. Therefore, a Linux partition is not bootable by itself, even if it contains a kernel and a valid root file system. A boot sector with valid code for booting the system has the same magic number as the MBR in its last 2 bytes (AA55).

7.1.3. Booting DOS or Windows

If the MBR contains generic boot code, the system to boot can be determined by means of just one primary partition that is marked as active or bootable. Normally, the validity of the boot sector of this partition is also checked. After booting the system, another system can easily be selected with fdisk.

If a DOS or Windows partition is active, the boot sector loads the .sys drivers needed for booting the system. In DOS, only one primary partition can be marked as active. Therefore, the DOS system cannot be installed on logical drives in an extended partition.

Windows 2000 and XP can also be installed in a logical partition. Multiple Windows installations at the same time are even possible. However, the boot files are written to a primary partition. If another 2000 or XP system is installed, it is automatically added to the boot menu. Thus, the condition that Windows needs a primary partition is still valid.