Boot Sequence
- To detect all device
- Configure plug and ply device
- Identify the first boot loader
1stage boot loader:- When appropriate boot device found the first stage boot loader into RAM then it take less then 512 bytes to excutes and its job is loaded into second stage boot loader
2nd Stage boot loader:-(Grub) In RHEL 3 we have two type of boot loader
1.GRUB
2.LILO
In RHEL 4 we have only one type of boot loader (GRUB)
Functions Of Grub
- To identify the partation with appropriate boot file
- To load the kernel
- To run the initial
- Select os (If multiple os)
- RAMDISK(init)
- To setup the kernel & its asociate module
*Default=1 (Specify by which kernel or os Default started at boot time)
*Timeout=5 (Provide time select os at boot time)
*Hiddenmenu=(Remove this to get os or kernel selection term automatically at boot time)
Grub has 3 interface
- Menu Interface:-Press at any key at boot time
- Menu edit interface:-To go in menu edit interface
- Command mode interface:-
- Press "e" at selected options
- press "d" to delet a line
- insert new line below the cursoer "o"
- insert new line above the cursoer "shift+o"
- To boot "b"
To corrept the grub
#dd if =/dev/zero of=/dev/sda bs=1 count=1024
To reinstall
- Insert a linux DVD
- Go to the rescue mode
[root@khan~]#chroot /mnt/sysimage
[root@khan~]#grub-install /dev/sda
[root@khan~]#exit
Protect the Grub
[root@khan~]#grub-md5-crypt >> /boot/grub/grub.conf
Kernel:-
- Device Detetion
- Driver initialization
- Mounting not file system in read only mode
- Load initial process
- Process managment
- Memory managment
- file system managment
- I/O managment
- /etc/rc.d/rc.sysinit
- /etc/rc.d/rc
- /etc/rc.d/rc?.d
- /etc/rc.d/rc.local
- Check the initial runlevel
- system initilazation script
- runlevel specific directory
/etc/rc.d/rc.sysinit
- activate udev & selinux
- set kernel parameter in /etc/sysctl.conf
- set the system clock
- load keymap
- enable the swap partation
- set the hostname
- root file system check & remounting
- enable disk quota
- check & mount other file system
- Activate RAID & LVM partation
- /etc/rc.d/rc?.d(runlevel control)
- It check is which runlevel your system start
- system creat a seprate directory for each runlevel
- /etc/rc.d/rc0.d-------> (runlevel 0)
- /etc/rc.d/rc1.d-------> (runlevel 1)
- /etc/rc.d/rc2.d-------> (runlevel 2)
- /etc/rc.d/rc3.d-------> (runlevel 3)
- /etc/rc.d/rc4.d-------> (runlevel 4)
- /etc/rc.d/rc5.d-------> (runlevel 5)
- /etc/rc.d/rc6.d-------> (runlevel 6)