Sabtu, 10 Desember 2011

Linux Network Server

Chapter 1: 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 Two Linux loaders, LILO and GRUB, are covered in this chapter. LILO is given the bulk of the
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.
Loading the Boot Sector
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.


Floppy disks have only one boot sector, but hard disks may have more than one because each
partition on a hard drive has its own boot sector. The first boot sector on the entire hard disk is
called the master boot record (MBR). It is the only boot sector loaded from the hard drive by the
ROM BIOS. The MBR contains a small loader program and a partition table. If the standard DOS
MBR is used, it loads the boot sector from the active partition and then passes control to the boot
sector. Thus, both the MBR and the active partition's boot sector are involved in the boot process.
Figure 1.1 shows how the boot process flows from the BIOS to the MBR and then to the partition's
boot sector. This figure assumes a DOS MBR and a Linux loader in the boot sector of the active
partition. Alternatively, the Linux loader can be installed in the MBR to eliminate one step in the boot
process.
Figure 1.1: The boot process flow
Note Appendix A, "Installing Linux," discusses the pros and cons of placing the Linux loader in the
MBR.
The BIOS may introduce some limitations into the Linux boot process. The Linux kernel can be
installed anywhere on any of the disks available to the system, but if it is outside of those limits, the
system might not be able to boot. The Linux loader depends on BIOS services. Some versions of
BIOS only permit the loader to access the first two IDE hard drives: /dev/hda and /dev/ hdb.
Additionally, in some cases, only the first 1024 cylinders of these disks can be used when booting
the system. These limitations are at their worst on old systems. New systems have two IDE disk
controllers that provide access to four disk drives, and these controllers address up to 8GB of disk
storage within the 1024−cylinder limit. A very old system might address only 504MB in 1024
cylinders!
For a server installation, this is not a real problem. Because servers do not dual−boot, everything
can be removed from the disk, and the Linux boot files can be installed in the first partition without
difficulty.
A desktop client is a different matter. Most desktops have Microsoft Windows installed in the first
partition. If there is available space within the first 1024 cylinders on the first disk drive, use fips to
create empty space and install the Linux boot partition there. (Partitioning is discussed in detail in
Appendix A.) Otherwise, a client system that dual−boots is forced to use one of the following
methods:

Tidak ada komentar:

Posting Komentar