The basic stages of the boot process of LINUX Operating System for an x86 system:
1. The system BIOS checks the system and launches the boot loader on the MBR [ MBR stands for Master Boot Record, which occupy 512 Bytes only.]
2. The boot loader loads itself into memory and launches the boot loader from the /boot/ partition.
3. Then boot loader loads the kernel into memory, which in turn loads any necessary modules and mounts the root partition read-only.
4. Then the kernel transfers control of the boot process to the /sbin/init program.
5. Then the /sbin/init program loads all services and user-space tools, and mounts all partitions listed in /etc/fstab file.
6. Then the user is presented with a login screen to get login into system.
Note:- MBR contains machine code instructions for booting the machine, called a boot loader along with the partition table.
Note that boot loader do not load more than one Operating System at a same time, even if the machine is “multi-boot” system.
Little Detail Look in Boot Process.
The GRUB has the advantage of being able to read ext2 and ext3 partitions and then load its configuration file from /boot/grub/grub.conf — at boot time.
The Kernal is a core of Linux. It loads into RAM, at the time of machine boots, and it runs until the computer is shutdown.
The initramfs is used by the Linux kernel to load different drivers and modules necessary to boot the system.
After it once the kernel and the initramfs image(s) are loaded into memory, the boot loader hands control of the boot process to the kernel.
Now when the kernel is loaded, it will immediately initializes and configures the system’s memory and configures the various hardware which are attached to the system, which includes processors, storage devices and some others.
And kernel then creates a root device, mounts the root partition read-only, and frees any unused memory.
Now after it to set up the user environment, the kernel executes the /sbin/init program.
The /sbin/init program which is also called as “init” coordinates the rest of the boot process and configures the environment for the system user.
The init daemon is one of the most important Linux daemon. Because it creates the processes for the rest of the system.
Note :- Daemon—Daemon is the program which runs in the background.
When daemon command start, it will 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
The init program is usually kept in /bin directory, and some distributions of linux keeps it in /sbin. The configuration files are always kept in /etc.
The init daemon is executed when linux starts and stay active until linux system is get shut down.
When the init daemon is executed, it will reads instructions from the file /etc/inittab, which is primarily used to start getty processes for terminals and other processes required by the linux system.
While examining the /etc/inittab file, init searches for an entry labeled initdefault, which sets the default initial run level of the system.
If no initdefault level is defined in the /etc/inittab file, the system prompts for the level.
Runlevels are a state, or mode, defined by the services, which is listed in the SysV /etc/rc.d/rc.d/ directory, where is the number of the specific runlevel
The init daemon knows which processes are associated with each run level from information in the /etc/inittab file.
The Boot Loader GRUB
The Boot Loader is mainly used for following purpose,
 For selecting an Operating System from different option.
 For locating the kernel.
 When we need to identify the partition.
The GRand Unified Boot loader (GRUB) is the default bootloader for RedHat linux.
1. It is password protected boot loader.
2. We can easily edit GRUB during boot process.
3. We can change different parameter in GRUB configuration file, without making any permanent changes in it.linux how tos, linux-how-tos, linux-howto, useradd, adduser, ls, dir, pwd,
4. Another good advantage of GRUB is that, it supports Logical Block Addressing.
( LBA ) mode, so it can help system to findout the /boot files.
1. The main GRUB configuration file is /boot/grub/grub.conf, for it is also linked to /etc/grub.conf for convenience in use.
The main configuration file of GRUB. /boot/grub/grub.conf
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,5)
# kernel /vmlinuz-version ro root=/dev/hdc7
# initrd /initrd-version.img
title Fedora Core (2.6.11-1.1369_FC4)
kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/1 rhgb quiet
The main GRUB VARIABLES
 password — It is used to protect GRUB with use of –md5 encryption.
 default — It will specifies the default operating system. E.g., if the default=0, then what ever the title in first line will boots automatically.
 timeout — It shows the time before which GRUB starts.
 splashimage — It shows the GURB’s image.
 title — It will show the options of GRUB menu which you find on screen at
 root — This root will indicates the partition with /boot files.
 kernel — Linux kernel’s location.
 initrd — Initial RAM disks’s location.
 rootnoverify — It configures the root partition for GRUB, just like the root command, but it will does not mount the partition.
 chainloader — It will loads the specified file as a chain loader.
linux how tos, linux-how-tos, linux-howto, useradd, adduser, ls, dir, pwd, groupadd, passwd, redhat, ubuntu, festi, suse, centos, debain, slackware, mandrake, fedora, knopix