Skip to content
Tags

How Linux System Boots

May 10, 2010

centosUnderstanding Booting Process in LINUX ( Redhat, Fedora, Centos )

The Booting process is the first process that is executed when you start a Linux system.
This process is executed in the following steps:

1. The processor searches for the Basic Input/Output System (BIOS) program in the
memory and executes it. BIOS is a program that provides the lowest level interface to
the devices, such as the hard disk, monitor, and mouse, of the system.

2. BIOS runs the Power-On Self Test (POST) program, which checks the system
hardware by verifying the hardware configuration information. The program does this
to ensure that all the required hardware devices are present and functioning properly.

3. BIOS checks the system memory for errors and searches for a bootable device. The
bootable device may either be the hard disk or other bootable devices, such as a CD-
ROM or a diskette drive. The sequence in which BIOS searches for the various
devices for the boot record is called the booting sequence
You can specify the booting sequence by editing the booting sequence information in the
BIOS setup program. To enter the BIOS setup program, you need to press the or
key on the first boot up screen. The boot sequence can be specified as CD-
ROM, C, A, where C represents the hard drive and A represents the diskette drive. In the
preceding boot sequence, BIOS will first search the CD-ROM for the boot record, then
search the hard drive and in the end search the diskette. The following list describes the
sequence in which the boot loader is invoked and loaded:

4. BIOS checks the bootable device for the presence of the Master Boot Record (MBR),
which is the first sector of the bootable device. The MBR is 512 bytes in size and
consists of a boot loader and a partition table. The boot loader contains instructions in
the form of machine code for booting the system. The partition table contains
information about the various partitions of the storage devices, such as the size of the
various partitions and the names of the partitions.

5. BIOS locates and invokes the boot loader by passing the control of the system to the
Initial Program Loader (IPL), also called the first stage of the boot loader, which is
present in the MBR.

6. IPL loads the boot loader in the system memory.

The boot loader takes the control of the system from the IPL when it is loaded into the
memory of the system.

GRUB Configuration File

The GRUB configuration file specifies the various commands that are used to set the
global preferences of the system. The global preferences are the parameters that are not
specific to any operating system and are applicable to the entire menu interface of GRUB.
These preferences are followed by the commands specific to each operating system listed
on the menu interface.

The default location of grub.conf in the filesystem is /boot/grub/grub.conf. A sample
grub.conf file of a system having RHEL5 is shown below:

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.18-5.EL5)
root (hd0,0)
kernel /vmlinuz-2.6.9-5.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-5.EL5.img

A sample grub.conf file of a system having RHEL5 and Windows XP operating systems
is shown below:

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.18-5.EL5)
root (hd0,0)
kernel /vmlinuz-2.6.18-5.EL5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-5.EL5.img
title Windows
rootnoverify (hd0,0)
chainloader +1

In the preceding grub.conf file the various configuration directives are:

· default: Specifies default operating system to load
· timeout: Specifies the time interval, in seconds, GRUB waits for user to select an
operating system from GRUB menu
· splashimage: Specifies the absolute path of the image shown by GRUB on screen at bootup
· hiddenmenu: Specifies GRUB to hide the menu until user presses a key
· title: Specifies the OS name shown in GRUB menu
· root: Specifies the partition where grub is installed
· kernel: Specifies the absolute path of the kernel file to load and label of root partition
· initrd: Specifies the absolute path of the initial RAM disk

· rootnoverify: Specifies the root partition to be used by GRUB but does not mount the partition
· chainloader: Specifies GRUB to load the file as a chain loader

For more Infotmation Click here World Of Information.

Advertisements

From → Linux

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: