You are on page 1of 12

Chapter – 5

Linux Boot Process & Run


At the end of this module, you would have

gained fair knowledge on:

•Run Levels
•Booting procedure
•Boot loader configuration
•Shutting down a Linux system
Boot Process
One of the most powerful aspects
of Red Hat Linux concerns its open method of
starting and stopping the operating system,
where it loads specified programs using their
particular configurations, permits you to change
those configurations to control the boot process,
and shuts down in a graceful and organized
Boot Process
• When a computer is booted, the processor looks at
the end of the system memory for the BIOS (Basic
Input/Output System) and runs it.
• The BIOS program is written into read-only
permanent memory and is always available for use.
• The BIOS provides the lowest level interface to
peripheral devices and controls the first step of the
boot process.
• The BIOS tests the system, looks for and checks
peripherals, and then looks for a drive to use to boot
the system.
• Usually, it checks the floppy drive (or CD-ROM drive
on many newer systems) for bootable media, if
present, and then it looks to the hard drive.
Boot Process
6. The order of the drives used for booting is usually controlled
by a particular BIOS setting on the system.
7. Once Red Hat Linux is installed on a hard drive of a system,
the BIOS looks for a Master Boot Record (MBR) starting at
the first sector on the first hard drive, loads its contents into
memory, and passes control to it.
8. This MBR contains instructions on how to load the boot
loader, GRUB or LILO (LInux LOader), depending on the
boot loader you installed.
9. The MBR then loads the boot loader, which takes over the
process (if the boot loader is installed in the MBR).
10.In the default Red Hat Linux configuration, GRUB or LILO
uses the settings in the MBR to display boot options and
allow for user input on which operating system to actually
start up.
Options in /etc/lilo.conf


Init Run levels

enerally, Red Hat Linux operates in runlevel 3 — full multi-

user mode. The following runlevels are defined in Red Hat

0 — Halt

1 — Single-user mode

2 — Not used (user-definable)

3 — Full multi-user mode

4 — Not used (user-definable)

• If you are using LILO, you can enter single-user mode
by typing linux single at the LILO boot: prompt.
• If you are using GRUB as your boot loader, you can
enter single-user mode using the following steps.
• In the graphical GRUB boot loader screen, select the
Red Hat Linux boot label and press [e] to edit it.
• Arrow down to the kernel line and press [e] to edit it.
• At the prompt, type single and press [Enter].
• You will be returned to the GRUB screen with the
kernel information. Press the [b] key to boot the system
into single user mode.
Initscript Utilities
The chkconfig utility in /sbin provides a simple
command-line tool for maintaining the /etc/rc.d/init.d
directory hierarchy. It relieves system administrators
from having to directly manipulate the numerous
symbolic links in the directories under /etc/rc.d.

In addition, there is ntsysv that provides a text-based

interface, which you may find easier to use than
chkconfig's command-line interface. If you prefer a
graphical interface, use the serviceconf program. All of
these utilities must be run as root.
SysV Init
SysV init is the standard init process in the Linux world to
control the startup of software at boot time, because it is easier to
use and more powerful and flexible than the traditional BSD init.

Sysconfig Information
The following files are normally found in /etc/sysconfig:
Shutting Down
To shut down Red Hat Linux, issue the shutdown command. You
can read the shutdown man page for complete details, but the two
most common uses are:
You must run shutdown as root. After shutting everything down,
the -h option will halt the machine, and the -r option will reboot.
Although the reboot and halt commands are now able to invoke
shutdown if run while the system is in runlevels 1-5, it is a bad
habit to get into, as not all Linux-like operating systems have this
/sbin/shutdown -h now
/sbin/shutdown -r now