Installation guide

The boot loader then places one or more appropriate initramfs images into memory. Next, the kernel
decompresses these images from memory to /sysroot/, a RAM-based virtual file system, via cpio.
The initramfs is used by the kernel to load drivers and modules necessary to boot the system.
This is particularly important if SCSI hard drives are present or if the systems use the ext3 file system.
Once the kernel and the initramfs image(s) are loaded into memory, the boot loader hands control
of the boot process to the kernel.
For a more detailed overview of the GRUB boot loader, refer to Chapter 9, The GRUB Boot Loader.
33.2 .2 .1. Bo o t Lo ade rs fo r Ot he r Archit ect ure s
Once the kernel loads and hands off the boot process to the init command, the same sequence of
events occurs on every architecture. So the main difference between each architecture's boot process
is in the application used to find and load the kernel.
For example, the Itanium architecture uses the ELILO boot loader, the IBM eServer pSeries
architecture uses yaboot, and the IBM System z systems use the z/IPL boot loader.
33.2.3. T he Kernel
When the kernel is loaded, it immediately initializes and configures the computer's memory and
configures the various hardware attached to the system, including all processors, I/O subsystems,
and storage devices. It then looks for the compressed initramfs image(s) in a predetermined
location in memory, decompresses it directly to /sysroot/, and loads all necessary drivers. Next, it
initializes virtual devices related to the file system, such as LVM or software RAID , before completing
the initramfs processes and freeing up all the memory the disk image once occupied.
The kernel then creates a root device, mounts the root partition read-only, and frees any unused
memory.
At this point, the kernel is loaded into memory and operational. However, since there are no user
applications that allow meaningful input to the system, not much can be done with the system.
To set up the user environment, the kernel executes the /sbin/init program.
33.2.4 . T he /sbin/init Program
The /sbin/init program (also called init) coordinates the rest of the boot process and
configures the environment for the user.
When the init command starts, it becomes the parent or grandparent of all of the processes that
start up automatically on the system. First, it runs the /etc/rc.d/rc.sysinit script, which sets the
environment path, starts swap, checks the file systems, and executes all other steps required for
system initialization. For example, most systems use a clock, so rc.sysinit reads the
/etc/sysconfig/clock configuration file to initialize the hardware clock. Another example is if
there are special serial port processes which must be initialized, rc.sysinit executes the
/etc/rc.serial file.
The init command then runs the /etc/inittab script, which describes how the system should be
set up in each SysV init runlevel. Runlevels are a state, or mode, defined by the services listed in the
SysV /etc/rc.d/rc<x>.d/ directory, where <x> is the number of the runlevel. For more information
on SysV init runlevels, refer to Section 33.4, “SysV Init Runlevels .
Next, the init command sets the source function library, /etc/rc.d/init.d/functions, for the
system, which configures how to start, kill, and determine the PID of a program.
Chapt er 33. Boot Process, Init , and Shut down
34 1