Step 1. BIOS (Basic Input Out System)
- System power on, hardware transfer control to BIOS.
- BIOS is the first program to run and it’s OS independent.
- BIOS resides on ROM (Read only Memory).
- First step of BIOS (Basic Input Out System) is the Power on self test (POST) which scan
hardware information and checks for bootloader. - Scans for boot devices (Floppy, CD and/or DVD drive). During that period we can press
keys (F2, F12) depends on your system to change boot sequence. - BIOS reads very first sector of hard drive. That is called boot sector where Bootloader
resides. Once bootloader is detected and BIOS loads and provide control to bootloader and
start processing next level of booting sequence.
Step 2. MBR (Master Boot Record)
- Master Boot Record (MBR) is located in the First Sector of bootable disk.
- Bootloader may resides in the MBR or may elsewhere.
- MBR which has 512 bytes in size which has three components.
- The first 446 bytes are for primary boot loader which contains executable code.
- Next 64 bytes are for partitiontable information.
- Last 2 bytes is used for Magic number (validation check of MBR).
- MBR contains GRUB/LILO information then execute GRUB/LILO bootloader.
Step 3. GRUB (GRand Unified Bootloader)
- GRUB Stands for (GRand Unified Bootloader). GRUB has its own menu interface and has ability to navigate filesystem.
- Displays a list of available kernels defined in /etc/grub.conf. Provide options to choose if multiple kernel image is installed. Below is CentOS grub.conf file where we can see kernel and initrd image.
#boot=/dev/sda
default=0
timeout=5
password --md5 $1$19oD/1$NklcucLPshZVoo5LvUYEp1
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-279.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-279.el6.i686 ro root=/dev/mapper/vg_tecmint-lv_root
rd_NO_LUKS rd_LVM_LV=vg_tecmint/lv_swap LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16
crashkernel=auto rd_LVM_LV=vg_tecmint/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb
quiet
initrd /initramfs-2.6.32-279.el6.i686.img
- GRUB display splash screen and wait for few seconds to intervene, if not it will loads
default kernel image. - GRUB Bootloader starts Kernel and loads initrd images.
Step 4. Kernel
- Mount root file system.
- Kernel starts INIT process. Since it’s first process to start by kernel which has Process ID (PID) of 1.
- Loads initrd module. initrd (initial RAM disk) is a temporary root file system loaded in RAM until root file system mounted.
Step 5. INIT
- INIT (father of all processes).
- INIT (short for initialization) deamon spawn all other processes
- INIT looks for file /etc/inittab for instructions to proceed.
- Here’s the inittab from CentOS.
- Runs scripts /etc/rc.d/*
Step 6. Runlevel Programs
There are seven runlevels and it has its own significant in Linux Operating system. Thedifferent run levels are as follows:
- Run Level 0 – Halt
- Run Level 1 – Single user mode
- Run Level 2 – Multiuser but without NFS
- Run Level 3 – Full multiuser mode
- Run Level 4 – unused / User-definable
- Run Level 5 – X11
- Run Level 6 – reboot
following directories.
- Run Level 0 – /etc/rc.d/rc0.d/
- Run Level 1 – /etc/rc.d/rc1.d/
- Run Level 2 – /etc/rc.d/rc2.d/
- Run Level 3 – /etc/rc.d/rc3.d/
- Run Level 4 – /etc/rc.d/rc4.d/
- Run Level 5 – /etc/rc.d/rc5.d/
- Run Level 6 – /etc/rc.d/rc6.d/
0 comments:
Post a Comment