The document summarizes the 6 main stages of the Linux boot process:
1) The BIOS performs checks and loads the master boot record (MBR) from the hard drive.
2) The MBR loads the GRUB boot loader.
3) GRUB has two stages - stage 1 in the MBR points to stage 2, which loads the GRUB configuration file and displays the boot menu.
4) The GRUB configuration file specifies the default or chosen kernel to load from available options.
5) The kernel is loaded and starts initial processes before handing over to userspace.
6) Linux shutdown uses commands to notify users and block logins before signaling processes and powering off in
3. BIOS stands for Basic Input/Output System
• Perf orms some syst em int egrit y checks
• Searches, loads, and execut es t he boot
loader program.
• I t looks f or boot loader in f loppy, CD-ROM,
or hard drive. You can press a key
(t ypically F12 of F2, but it depends on your
syst em) during t he BI OS st art up t o
change t he boot sequence.
• So, in simple t erms BI OS loads and
execut es t he MBR boot loader.
4. MBR stands for Master Boot Record.
• I t is locat ed in t he 1st sect or of t he
boot able disk. Typically / dev/ hda, or
/ dev/ sda
• MBR is less t han 512 byt es in size. This
has t hree component s 1) primary boot
loader inf o in 1st 446 byt es 2) part it ion
t able inf o in next 64 byt es 3) mbr
validat ion check in last 2 byt es.
• I t cont ains inf ormat ion about GRUB (or
LI LO in old syst ems)
6. • Furt hermore, GRUB works in st ages.
• St age 1 is locat ed in t he MBR and mainly
point s t o St age 2, since t he MBR is t oo small
t o cont ain all of t he needed dat a.
• St age 2 point s t o it s conf igurat ion f ile,
which cont ains all of t he complex user
int erf ace and opt ions we are normally
f amiliar wit h when t alking about GRUB.
St age 2 can be locat ed anywhere on t he disk.
I f St age 2 cannot f ind it s conf igurat ion
GRUB “Grand Unified Bootloader”
7. GRUB “Grand Unified Bootloader”
• I f you have mult iple kernel images
inst alled on your syst em, you can choose
which one t o be execut ed.
• GRUB displays a splash screen, wait s f or
f ew seconds, if you don’t ent er anyt hing, it
loads t he def ault kernel image as specif ied
in t he grub conf igurat ion f ile.
• GRUB has t he knowledge of t he f ilesyst em
• Grub conf igurat ion f ile is
/ boot / grub/ grub.conf
10. GRUB “Grand Unified Bootloader”
• This is t he f irst operat ing syst em ent ry in t he
menu.
• t it le is as simple as it sounds. I t ' s merely a
st ring t hat ' s meant t o help t he user read t he
menu in human t erminology.
• root (hd0,2) t ells GRUB where it s conf igurat ion
f iles are locat ed. I n t his inst ance, t hey can be
f ound under (hd0,2)/ boot / grub.
• kernel / boot / vmlinuz-... boot s t he act ual kernel
image. There can be many such images available.
The f act t here is no device specif ied bef ore t he
/ boot / vmlinuz indicat es t he image is locat ed on
t he same part it ion as t he GRUB it self . This is
11. Linux and Unix shutdown command
• The shut down command br ings t he syst em
down in a secure way. All logged-in user s ar e
not if ied t hat t he syst em is going down, and
login operat ions ar e blocked. I t is possible t o
shut t he syst em down immediat ely, or af t er a
specif ied delay.
• All processes are f irst not if ied t hat t he
syst em is going down by t he signal SI GTERM.
This gives programs like vi t ime t o save t he
f ile being edit ed, mail and news pr ocessing