When Linux OS boot, below are the steps executed:
- Switch on The system
- BIOS: POST and gives the control the boot device and MBR
- MBR Executes the boot loader
- GRUB Menu list
- GRUB Loads Kernel and Initrd
- Initrd: Initial root filesystem with required drivers
- kernel loads the actual root filesystem
- /sbin/init is executed
- checks runlevel in /etc/inittab
- Runs all the files present in /etc/rcN.d/s
- Runs /etc/rc.local
runlevels
0 - halt (shut down)
1 - single user mode
2 - multiuser mode , without NFS
3 - full multiuser mode
4 - unused
5 - with GUI
6 - reboot
vim /etc/rc.local -- here you can run custom scripts
Detail explanation
Switch ON the system
BIOS: POST and gives control the Boot Device and loads MBR
BIOS -- Basic Input/output system and present at ROM(Read only memory) which is present on chip-set into the motherboard
First role of BIOS is to perform POST -- Power on self test makes sure hardware to system is working fine the hard disk working fine the keyboard the screen could be accessible it can loads
BIOS provides functionality to load screen drivers
BIOS allows interaction with generic hardware.
BIOS allowed you to boot from hard disk, optical drive, USB, network
BIOS hands over to the first sector of the Disk
--> first sector of the hard disk have the information the how to start booting process
--> first sector consists of Master boot record (MBR)
MBR executes the boot Loader
MBR knows how to boot from Hard disk
In case you have multi boot environment to could be having
GRUB and LILO to install on it
LILO -- LINUX Loader
GRUB -- Grand unified boot loader
both of these provides multi boot environment
GRUB Menu LIST
vim /boot/grub/menu.list
ps -ef | grep init
runlevel
ll /etc/rc1.d
vim /etc/inittab -- default runlevel
No comments:
Post a Comment