Chapter 1.Boot Process, Init, and ShutdownAn important and powerful aspect of Red Hat Enterprise Linux is the open, user-configurable methodit uses for starting the operating system. Users are free to configure many aspects of the boot pro-cess, including specifying the programs launched at boot-time. Similarly, system shutdown gracefullyterminates processes in an organized and configurable way, although customization of this process israrely required.Understanding how the boot and shutdown processes work not only allows customization, but alsomakes it easier to troubleshoot problems related to starting or shutting down the system.1.1. The Boot ProcessBelow are the basic stages of the boot process for an x86 system:1. The system BIOS checks the system and launches the first stage boot loader on the MBR of theprimary hard disk.2. The first stage boot loader loads itself into memory and launches the second stage boot loaderfrom the /boot/ partition.3. The second stage boot loader loads the kernel into memory, which in turn loads any necessarymodules and mounts the root partition read-only.4. The kernel transfers control of the boot process to the /sbin/init program.5. The /sbin/init program loads all services and user-space tools, and mounts all partitionslisted in /etc/fstab.6. The user is presented with a login screen for the freshly booted Linux system.Because configuration of the boot process is more common than the customization of the shutdownprocess, the remainder of this chapter discusses in detail how the boot process works and how it canbe customized to suite specific needs.1.2. A Detailed Look at the Boot ProcessThe beginning of the boot process varies depending on the hardware platform being used. However,once the kernel is found and loaded by the boot loader, the default boot process is identical across allarchitectures. This chapter focuses primarily on the x86 architecture.1.2.1. The BIOSWhen an x86 computer is booted, the processor looks at the end of system memory for the BasicInput/Output System or BIOS program and runs it. The BIOS controls not only the first step of theboot process, but also provides the lowest level interface to peripheral devices. For this reason it iswritten into read-only, permanent memory and is always available for use.Other platforms use different programs to perform low-level tasks roughly equivalent to those of theBIOS on an x86 system. For instance, Itanium-based computers use the Extensible Firmware Interface(EFI) Shell, while Alpha systems use the SRM console.Once loaded, the BIOS tests the system, looks for and checks peripherals, and then locates a validdevice with which to boot the system. Usually, it checks any diskette drives and CD-ROM drivespresent for bootable media, then, failing that, looks to the system’s hard drives. In most cases, the