The Boot process
This chapter looks at what happens during a Linux boot. It examines the processes that take place
and the configuration files that are read. Booting is a critical part of the operation of a server. The
boot process brings all of the network hardware online and starts all of the network daemon
processes when the system is powered−up. If the server will not boot, it is unavailable to all of the
users and computers that depend on it. For this reason, it is essential that the administrator of a
network server understand the boot process and the configuration files involved in that process.
After all, you're the person who maintains those configuration files and who is responsible for
recovering the system when it won't boot.
The term boot comes from bootstrap loader, which in turn comes from the old saying "pull yourself
up by your bootstraps." The meaning of this expression is that you must accomplish everything on
your own without any outside help. This is an apt term for a system that must start from nothing and
finish running a full operating system. When the boot process starts, there is nothing in RAM—no
program to load the system. The loader that begins the process resides in non−volatile memory. On
PC systems, this means that the loader is part of the ROM BIOS.
Booting a Linux PC is a multistep procedure. It involves basic PC functions as well as Linux
processes. This complex process begins in the PC ROM BIOS; it starts with the ROM BIOS
program that loads the boot sector from the boot device. The boot sector either contains or loads a
Linux boot loader, which then loads the Linux kernel. Finally, the kernel starts the init process, which
loads all of the Linux services. The next few sections discuss this process in detail.
Note
coverage because it is the default for most Linux distributions. GRUB is covered because it is
the default loader for Red Hat Linux 7.2.
Two Linux loaders, LILO and GRUB, are covered in this chapter. LILO is given the bulk of theLoadinSectorg the Boot
The ROM BIOS is configured through the BIOS setup program. Setup programs vary among
different BIOS versions, but all of them allow the administrator to define which devices are used to
boot the system and the order in which those devices are checked. On some PC systems, the
floppy drive and the first hard drive are the boot devices, and they are checked in that order.
Systems that permit booting from the CD−ROM usually list the CD−ROM as the first boot device,
followed by the first hard drive.
For an operational Linux server, set the ROM BIOS to check the floppy first and then the hard drive,
even if you used a bootable CD−ROM for the initial installation. The reason for this is simple: The
floppy is used to reboot an operational system when the hard drive is corrupted; the CD−ROM is
only booted to install or upgrade the system software. During an installation, the system is offline,
and you have plenty of time to fiddle with a BIOS setup program. But during an outage of an
operational server, time is critical. You want to be able to reboot Linux and fix things as quickly as
possible.
The first 512 bytes of a disk contain a boot sector. The ROM BIOS loads the boot sector from the
boot device into memory, and transfers control to it. The bootstrap program from the boot sector
then loads the operating system.
No comments:
Post a Comment