A tutorial for beginners who are curious to learn about the Linux boot process. If you have any more doubts, you can contact me through my email given in the slide, or through my blog: mastro77.blogspot.in
6. Step 1: BIOS
● Basic Input/Output System
● Executes MBR
● Looks for Bootloader in HDD/external device
7. Step 2: MBR
● Found in /dev/sda or /dev/hda
● Size: < 512 bytes
● Contains info about GRUB
● Executes GRUB bootloader
8. Step 3: GRUB
● GRand Unified Bootloader
● Can choose which kernel to be executed
● Displays a screen for a few seconds
● Default kernel image: /boot/grub/grub.
cfg
9. grub.cfg
● GRUB configuration file
● Has linux and initrd image
13. Step 4: Kernel
● Mounts the root file system
● Executes /sbin/init
14. Step 5: init
● init daemon starts processes from
/etc/inittab
● init identifies default init level and uses
to load appropriate program
15. /etc/inittab
● id:rstate:action:process
● id - identifier of the entry
● rstate - lists the runlevels
● action - which action to be taken
● process - process to start, monitor or
restart if terminated
16. Run levels
6 run levels:
● 0 - halt
● 1 - Single user mode
● 2 - Multiuser without NFS
● 3 - Full Multiuser mode
● 4 - unused
● 5 - X11
● 6 - Reboot
17. When not in quite
mode, you can see a lot
messages while booting.
18.
19. These are the
runlevel programs
executed from the
runlevel directory
20. Runlevel programs
● 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/
21. /etc/rc.d/rc*.d
● rc scripts are run control scripts
● Programs which starts with S are used for
Startup
● Programs which starts with K are used for
Shutdown