Linux Booting Process

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

Presentation on:

Presented by:
MD. Ashraful Alam
ID: 181-15-1844
PC:G
CONTENTS
1. What is BOOTING?
2. The 6 steps of Linux booting process
3. BIOS
4. MBR
5. GRUB
6. KERNEL
7. Init Process
8. Run Level Process
What is Booting?
Restarting a computer or its operating system software.

It is of two types :
(1) Cold booting: when the computer is started after having been switched off.
(2) Warm booting: when the operating system alone is restarted (without being switched off) after a
system crash or 'freeze.'

Both types of booting clear out (for the time being) the bugs, bombs, memory conflicts, and other
idiosyncrasies of the operating system.
THE 6 STEPS OF LINUX BOOTING PROCESS
1. BIOS
• BIOS stands for Basic Input/Output System
• Performs some system integrity checks
• Searches, loads, and executes the boot loader
program.
• It looks for boot loader in floppy, cd-rom, or hard
drive.
• You can press a key (typically F12 of F2, but it
depends on your system) during the BIOS
startup to change the boot sequence.
• Once the boot loader program is detected and
loaded into the memory, BIOS gives the control
to it.
2. MASTER BOOT
• RECORD
So, (MBR)
in simple terms BIOS loads and
executes the MBR boot loader.
• It is located in the 1st sector of the
bootable disk. MBR is less than 512
bytes in size.
• This has three components 1) primary
boot loader info in 1st 446 bytes 2)
partition table info in next 64 bytes 3)
mbr validation check in last 2 bytes.
• It contains information about GRUB .
• So, in simple terms MBR loads and
executes the GRUB boot loader.
3. Grand Unified Bootloader (GRUB)
• GRUB stands for Grand Unified
Bootloader.
• If you have multiple kernel images
installed on your system, you can
choose which one to be
executed.
• GRUB displays a splash screen, waits
for few seconds, if you don’t enter
anything, it loads the default kernel
image as specified in the grub
configuration file.
• GRUB has the knowledge of the
filesystem.
• So, in simple terms GRUB just
loads and executes Kernel and
initrd images.
4. KERNEL
This can be considered the heart of operating system responsible for handling all system
processes.

Kernel is loaded in the following stages:


1. Kernel as soon as it is loaded configures hardware and memory allocated to the
system.
2. Next it uncompresses the initrd image (compressed using zlib into zImage or bzImage
formats) and mounts it and loads all the necessary drivers.
3. Loading and unloading of kernel modules is done with the help of programs like insmod, and
rmmod present in the initrd image.
4. Looks out for hard disk types be it a LVM or RAID.
5. Unmounts initrd image and frees up all the memory occupied by the disk image.
6. Then kernel mounts the root partition as specified in grub.conf as read-only.
7. Next it runs the init process
5. Init Process
• Looks at the /etc/inittab file to decide the Linux run level.
•Following are the available run levels 0 – halt
1 – Single user mode
2– Multiuser, without NFS 3 – Full
multiuser mode
4 – unused
5 – X11
6 – reboot
• Init identifies the default initlevel from /etc/inittab and uses that to load all
appropriate program.
• If you want to get into trouble, you can set the default run level to 0 or 6.
Since you know what 0 and 6 means, probably you might not do that.
• Typically you would set the default run level to either 3 or 5.
6. RUNLEVEL

PROGRAMS
When the Linux system is booting up, you
might see various services getting started.
For example, it might say “starting sendmail
…. OK”. Those are the runlevel programs,
executed from the run level directory as
defined by your run level.
• Programs starts with S are used during
startup. S for startup.
• Programs starts with K are used during
shutdown. K for kill.
• There are numbers right next to S and K in
the program names. Those are the
sequence number in which the programs
should be started or killed.
Presentation Video Link: https
://drive.google.com/file/d/17J6-Ux0Mnfrs7bHUGuAU4OiL4mkHTgN6/view?
usp=sharing
THANKS!
Any questions?

You might also like