33.2. A Detailed Look at the Boot Process
33.2.1. The BIOS
33.2.2. The Boot Loader
/boot/grub/grub.conf— at boot time. Refer to Section 9.7, “GRUB Menu Configuration File” for information on how to edit this file.
/boot/directory. The kernel binary is named using the following format —
<kernel-version>corresponds to the kernel version specified in the boot loader's settings).
/sysroot/, a RAM-based virtual file system, via
initramfsis 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.
initramfsimage(s) are loaded into memory, the boot loader hands control of the boot process to the kernel.
22.214.171.124. Boot Loaders for Other Architectures
initcommand, 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.
33.2.3. The Kernel
initramfsimage(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
initramfsprocesses and freeing up all the memory the disk image once occupied.
/sbin/initprogram (also called
init) coordinates the rest of the boot process and configures the environment for the user.
initcommand 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.sysinitscript, 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
/etc/sysconfig/clockconfiguration file to initialize the hardware clock. Another example is if there are special serial port processes which must be initialized,
initcommand then runs the
/etc/inittabscript, 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”.
initcommand 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.
initprogram starts all of the background processes by looking in the appropriate
rcdirectory for the runlevel specified as the default in
rcdirectories are numbered to correspond to the runlevel they represent. For instance,
/etc/rc.d/rc5.d/is the directory for runlevel 5.
initprogram looks in the
/etc/rc.d/rc5.d/directory to determine which processes to start and stop.
K05innd -> ../init.d/innd K05saslauthd -> ../init.d/saslauthd K10dc_server -> ../init.d/dc_server K10psacct -> ../init.d/psacct K10radiusd -> ../init.d/radiusd K12dc_client -> ../init.d/dc_client K12FreeWnn -> ../init.d/FreeWnn K12mailman -> ../init.d/mailman K12mysqld -> ../init.d/mysqld K15httpd -> ../init.d/httpd K20netdump-server -> ../init.d/netdump-server K20rstatd -> ../init.d/rstatd K20rusersd -> ../init.d/rusersd K20rwhod -> ../init.d/rwhod K24irda -> ../init.d/irda K25squid -> ../init.d/squid K28amd -> ../init.d/amd K30spamassassin -> ../init.d/spamassassin K34dhcrelay -> ../init.d/dhcrelay K34yppasswdd -> ../init.d/yppasswdd K35dhcpd -> ../init.d/dhcpd K35smb -> ../init.d/smb K35vncserver -> ../init.d/vncserver K36lisa -> ../init.d/lisa K45arpwatch -> ../init.d/arpwatch K45named -> ../init.d/named K46radvd -> ../init.d/radvd K50netdump -> ../init.d/netdump K50snmpd -> ../init.d/snmpd K50snmptrapd -> ../init.d/snmptrapd K50tux -> ../init.d/tux K50vsftpd -> ../init.d/vsftpd K54dovecot -> ../init.d/dovecot K61ldap -> ../init.d/ldap K65kadmin -> ../init.d/kadmin K65kprop -> ../init.d/kprop K65krb524 -> ../init.d/krb524 K65krb5kdc -> ../init.d/krb5kdc K70aep1000 -> ../init.d/aep1000 K70bcm5820 -> ../init.d/bcm5820 K74ypserv -> ../init.d/ypserv K74ypxfrd -> ../init.d/ypxfrd K85mdmpd -> ../init.d/mdmpd K89netplugd -> ../init.d/netplugd K99microcode_ctl -> ../init.d/microcode_ctl S04readahead_early -> ../init.d/readahead_early S05kudzu -> ../init.d/kudzu S06cpuspeed -> ../init.d/cpuspeed S08ip6tables -> ../init.d/ip6tables S08iptables -> ../init.d/iptables S09isdn -> ../init.d/isdn S10network -> ../init.d/network S12syslog -> ../init.d/syslog S13irqbalance -> ../init.d/irqbalance S13portmap -> ../init.d/portmap S15mdmonitor -> ../init.d/mdmonitor S15zebra -> ../init.d/zebra S16bgpd -> ../init.d/bgpd S16ospf6d -> ../init.d/ospf6d S16ospfd -> ../init.d/ospfd S16ripd -> ../init.d/ripd S16ripngd -> ../init.d/ripngd S20random -> ../init.d/random S24pcmcia -> ../init.d/pcmcia S25netfs -> ../init.d/netfs S26apmd -> ../init.d/apmd S27ypbind -> ../init.d/ypbind S28autofs -> ../init.d/autofs S40smartd -> ../init.d/smartd S44acpid -> ../init.d/acpid S54hpoj -> ../init.d/hpoj S55cups -> ../init.d/cups S55sshd -> ../init.d/sshd S56rawdevices -> ../init.d/rawdevices S56xinetd -> ../init.d/xinetd S58ntpd -> ../init.d/ntpd S75postgresql -> ../init.d/postgresql S80sendmail -> ../init.d/sendmail S85gpm -> ../init.d/gpm S87iiim -> ../init.d/iiim S90canna -> ../init.d/canna S90crond -> ../init.d/crond S90xfs -> ../init.d/xfs S95atd -> ../init.d/atd S96readahead -> ../init.d/readahead S97messagebus -> ../init.d/messagebus S97rhnsd -> ../init.d/rhnsd S99local -> ../rc.local
/etc/rc.d/rc5.d/directory. Rather, all of the files in
/etc/rc.d/rc5.d/are symbolic links pointing to scripts located in the
/etc/rc.d/init.d/directory. Symbolic links are used in each of the
rcdirectories so that the runlevels can be reconfigured by creating, modifying, and deleting the symbolic links without affecting the actual scripts they reference.
Klinks are processes that are killed on that runlevel, while those beginning with an
initcommand first stops all of the
Ksymbolic links in the directory by issuing the
/etc/rc.d/init.d/<command> stopcommand, where <command> is the process to be killed. It then starts all of the
Ssymbolic links by issuing
/etc/rc.d/init.d/httpd stopstops the Apache HTTP Server.
initprogram executes is the
/etc/rc.d/rc.localfile. This file is useful for system customization. Refer to Section 33.3, “Running Additional Programs at Boot Time” for more information about using the
initcommand has progressed through the appropriate
rcdirectory for the runlevel, the
/etc/inittabscript forks an
/sbin/mingettyprocess for each virtual console (login prompt) allocated to the runlevel. Runlevels 2 through 5 have all six virtual consoles, while runlevel 1 (single user mode) has one, and runlevels 0 and 6 have none. The
/sbin/mingettyprocess opens communication pathways to tty devices, sets their modes, prints the login prompt, accepts the user's username and password, and initiates the login process.
/etc/inittabruns a script called
prefdmscript executes the preferred X display manager —
xdm, depending on the contents of the