Hello everyone and
welcome to this video.
So in this video we are going to see the Linux boot
process. Now every one of you must
be knowing that whenever we press the power
button our computer gets started, but what
actually happening behind the
hood in the background is very
important to know and understand.
There is the reason we are going to understand the Linux
boot process and how a system
actually starts. So it
follows six high level
steps in the boot process and we
are going to understand each one of
them one by one in depth
So let's begin with the first one which is bios.
So bios stands for basic input
output system, which execute the
MBR?
The second one is MBR which stands
for master boot record, which
then executes the grub.
The full form of grub is Grand unified
bootloader which then in
turn execute the kernel.
Next is the kernel which is also known as the
heart of the computer which executes the
sin and the init programs.
Next is in it, which is also known as
initialization which executes the
Run level programs into the Linux system.
The next one is the Run levels now
run level are the programs which are
executed from this directory, which is
slash Etc. / RC dot d
slash rc1.d RC
2 dot d, which has been demonstrated here
with rcstar.d.
Now run levels are those levels in
which the Linux system will boot.
For example, there are multiple run levels
which start from run level 0 to run level
6, which we are going to understand in the later
part of the lesson.
Now, let's quickly understand. What is bios
as we have learned. The full
form of BIOS is basic input output
system.
Now what does actually the BIOS does
it performs the Integrity checks,
it also searches loads and
executes the bootloader program.
Now whenever you start your computer bios quickly
checks for all the CD DVDs SD
cards and the hardest drives which have
been attached to your computer.
It also checks the boot sequence now. If you
want to modify the boot sequence, you can press the keys
which is F12 or F2 and it
may also very based on your system.
The next one is the MBR which stands
for the master. Boot record. Now, the
MBR is located into the first sector
of the bootable disk. It
is usually into this path,
which is slash Dev slash SDA where
Dev stretch for device or sometimes.
It's in slash Dev slash HD a
this is the first sector of
the bootable disc.
Now it is always less than 512 bytes
in size and it has three major components
as you can see onto the right hand side
of the screen the first four four
six bytes are being assigned to the
primary bootloader info the next
64 bytes have been assigned to
the partition table and the last two bytes
are given to the grub, which we are
going to see the next.
So what does grub stands for
and what is the importance of it?
So grub stands for Grand unified bootloader.
Now it chooses the kernel image to load
and it executes it later on.
It is like a splash screen onto your
computer which execute the default kernel
images from your computer. You can
have multiple kernel images like kernel 1
kernel 2 kernel 3 that can be
different operating systems like Kali parrot already
hat. So it loads and
executes the kernel and gives you
the opportunity to load into a specific operating system.
The next is the kernel, which is also known
as the heart of the computer it execute
the spin slash in
it, and there are multiple system programs
which get executed into this step.
Now the kernel mounts the
root file system into the grub.configuration file,
which has been specified.
It also executes the initialized programs,
which is located into the s-bin folder,
which is system in folder.
And finally, it loads the file system of
the operating system.
Next is the init so in it
executes the Run level programs. Now, you
may think what are the Run levels you're
going to understand the Run levels in next couple
of seconds.
So in it decides in which run
level your system needs to be booted. It
also decides the programs to be
loaded when your computer starts.
So coming to the Run level. How many are there
as you can see onto your screen in the
right hand side.
There are different run levels which starts from
run level 0 run level 1 to run
level 6 now, whenever your system boots, it
goes into a fixed run level, which
is the Run level 3, which is multi-user plus
networking.
Let's understand all the Run levels one by one.
So what does run level 0 stands for
its stands for shutdown or
halt which means onto your computer into
your terminal if you type run level
0 then your computer is going to shut down.
Now. You cannot type the command run level you
have to type the command which is in it zero which
gives the instruction to your
computer that the user wants to go into the
Run level, which is zero. So the command is in
it which stands for initialize the Run
level 0
The next is run level 1 now. If
you type in it one into your
terminal, you're going to go into a single user mode
without networking. That means only one
user can now use the system and they
will be no internet.
Next is the Run level 2 which is multiple
uses with no networking.
Run level 3 is the default run level
into which any operating system boots, which is
the multi-user plus networking. Now. This
is the Rel level which everywhere of
us gets by default booted in wherein multiple
users can be switched as well as we have
the network access.
Next one is the Run level 4 which is undefined and
which is used for research and
development purposes.
The next is the Run level 5 now run
level 5 works exactly as
run level 3, which is multi-user plus
networking with X11 protocol support
now.
X11 protocol is a display GUI
protocol, which is used to enhance the
operating system.
And the last one is the Run level 6 which is
used to reboot or restart the system.
So onto your terminal if you type in it
6 which means you are giving the instruction to
initialize the Run level 6 your computer
will automatically restart.
So now we have completed the Run levels, which is
run level 0 1 2 3 4
5 6 respectively.
Now as we have also understood the
Run levels and the programs that are executed from
this directory, which is slash Etc
slash rc.d. Slash rc1.d
RC 2 dot
d and so on.
We have also understood how the system executes program
based on fixed run levels.
We also understood the directories of
this programs.
Now one important thing to remember over
here is the programs that start with
s into those directories are used
for startup and the programs which starts with
k are used for shutdown now YK
because K stands for kill. I
hope you guys understood that what are the
Run levels and how the Linux boot process
functions
If you have any questions or queries, you can always post it
into the Q&A. Thank you.