Linux boot process, so this lesson, we will learn how this system boots up, so I'm sure you probably
wondered that when you press the button on your laptop or your computer, then you after a few minutes,
a few seconds, your computer come up, you get a log in prompt and your system started.
But have you ever wondered what exactly happens under the hood?
Meaning you start up your car and it ignites the spark and start up your car?
Right.
But what happened exactly behind the scene?
So I wanted to cover that because it's one of the very important lessons.
And some of the things in this lesson are important in terms of interview.
A lot of people ask you questions about what happened or tell us the sequence of process.
In this picture.
You will see exactly the six steps that a system takes place in order to bring your system to a level
where you will be able to log in.
The first one is every time you press the power button on your computer, it goes to bias.
What bias stands for is basic input and output of a system.
At this stage, it performs some system integrity checks loads and execute bootloader program.
It looks for bootloader like floppy disk or CD rom or your hard drive.
It tries to find out how to boot.
Where is it located?
Where do I have to go to bring the system up?
The next thing then it does.
It goes to MVR.
Now NPR stands for Master Boot Record.
It is located in the first sector of the bootable disk, typically like DEVE, FDA or FDA Linux.
So this is the first sector on your desk that is located to start the computer.
MVR is somehow like 512 megabytes in just bytes and size is very small and this it contains information
about Grubb.
The next step it does.
It goes to grab Grub's stands for Grand Unified Bootloader.
If you have multiple kernel images install on your system, you can choose which one to be executed.
So that could be older version of kernel, newer version of your or you could start it in any of the
kernel.
And that option is given to you by Grupp.
And the Grubbed configuration files are located in slash boot slash grub and the file is grubbed.
You can modify it.
If you want to change the order of your system, start the next one.
After the grub comes the kernel.
The kernel is the one that mounts the root file system as specified in the root equal in grubbed outcome
file.
That's exactly in the grubbed.
Is it actually execute the init program kernel, execute the slash SBN slash and IT program.
Then it starts the initial Ramdisk and initial Ramdas, which is I and I.
T already is used by kernel as a temporary root filesystem until kernel is booted and the real root
file system is mounted.
It also contains necessary drives compiled inside, which helps it to access the hard drive petition
and other hardware.
The next one goes through the the boot process is in it.
It looks like the slash at sea in a tab.
This is the file to decide the Linux run level.
So if you wanted to boot your system in a different run levels, let's say there are six different levels.
Actually several levels.
They're zero for a hard one for a single user mode, two for multiuser, three for a full multiuser
mode, and five is unused.
If so, for an unused five is to put the system in X eleven and six is to reboot.
These are the wrong levels that are defined inside of the in it and it tab file.
Once it does that, then the run level program begins to start and every level program has its own directory
and that directory is Etsi or C, D or C and the digit which is run level digit and D, every file,
every boot order is in these files.
So here are the run levels of Google, were a few of them and are Linux environment.
So let me log in to my Linux machine, clear the screen.
I want to become root because some of these files can only be accessed through route to the first one
is BIOS, which is located on the disk.
The second one is MVR.
And let's go to the kernel, which is Espin in it.
So we'll go etsi sorry, Espin in it.
Then you have other run programs, we could go to the other run programs like at C or C, D, and here
you see all the run levels if you wanted to start your computer and run level five.
So let's see which run level we are in.
Who are we going to run level five?
So we'll go into RC five D and here it's telling it to start the console, which is the GUI and start
the network, which is a network.
So this is what exactly run level five s and that's how your computer is storage.
You get the login prompt and there are also many, many different documentation online.
You can find out about how the system builds up.
And of course, I will encourage you to go look them up and understand exactly how the next budget process
works.