Hey everyone and welcome back to another skill.
So in this skill right here we have a lot of stuff to get to but the very first thing
that we are going to focus on is the Linux boot process.
Now the Linux boot process comprises of multiple different steps.
We have to understand what those steps are and well the very first thing that we should
do is talk about the first step in that process of course.
So the very first process or rather step in the process should I say is what is called
the BIOS.
Now the BIOS stands for the basic input output system and the first thing to understand about
the BIOS is that this is not related to Linux in fact it's not related to the operating
system itself this is actually to do with the hardware on your computer.
Now what is going to happen is that when you push the power button on your computer to
turn it on BIOS is going to effectively take action.
Now what the BIOS is going to do is it's going to perform something known as the post.
This is the power on self test.
Now all the post is going to do is it's going to just do some basic hardware checks.
So this could be things like checking your keyboards are operational so on so forth just
some very basic low level checks.
Now crucially what the BIOS is going to do is it's going to be responsible for booting
the operating system but the question is from where.
So what do I mean when I say that we'll think about it.
It may actually be not obvious that the operating system can be booted from different locations
typically this is going to come in the form of your hard drive that is where the operating
system is going to be installed but you can have things such as removable media say for
example you could have an operating system stored on a USB stick.
Now when the BIOS is engaged we can ultimately select whereabouts we want to try to find
this operating system should be check the hard drive first or should be check for removable
media should be check for CD ROMs whatever it may be.
But the key thing here is that the BIOS is going to search whatever location you tell
it to be at the hard drive or the USB whatever it may be.
The thing that the BIOS is going to look for and this is very very crucial the BIOS is going
to look for the presence of an MBR.
This is the master boot records.
Now so long as the BIOS can find the MBR everything is AOK the process can then continue.
So really if we happen to have a particular order i.e. we want to search the hard drive
first for an MBR if the BIOS finds an MBR we're going to load it from the hard drive.
However if it does not find it from the hard drive it can then get down the chain to the
next thing we have specified in our order of operations maybe that could be the USB
or CD ROM or a network based drive.
Nevertheless whatever it may be so long as we find this MBR which happens to be very
tiny indeed this is only 512 bytes after all but these are very important bytes that happen
to be located at the very first sector of the disk.
And so long as the BIOS can find that MBR it will then attempt to load the operating
system.
So really once the MBR runs the next stage is the bootloader is going to take effect.
Now to note there are different bootloaders available on Linux.
The very first bootloader is one called Lilo and the thing to note about Lilo is that it's
kind of old and antiquated you're not going to see it very much at all in modern based
systems if at all in a modern based system and Lilo is Linux specific this is the Linux
loader but ultimately this was replaced by the grand unified bootloader otherwise known
as Grubb.
Now Grubb itself has since been replaced with Grubb 2 which is really just the updated version
of Grubb and this really is the one that you're going to see all over the place in modern
Linux based systems.
The thing here about Grubb is that Grubb is not just a Linux based bootloader the way
Lilo is Grubb indeed can be used on other operating systems such as Windows.
Now when the bootloader happens to run you may be happen to see a splash menu.
Splash menu is just going to splash onto your screen and it's going to actually show you
the different operating systems that you have available to you so let's maybe say you happen
to have your hard disk and you partition it maybe you have a Linux operating system here
let's maybe say Ubuntu and you also have a Windows operating system on the same disk
this would be known as a dual boot scenario so let's maybe say you loved Linux for your
system administration based stuff but you happen to really like the gaming ecosystem
of Windows you wanted to have both the bootloader such as Grubb 2 is going to allow you to select
which operating system we actually want to boot into now whatever bootloader you're using
whether it is Lilo whether it is Grubb we have a primary purpose here that bootloader
is going to load the kernel into memory now this is a very very important step the kernel
as you may know is a very important part of the operating system it happens to be the
core of the operating system and basically this kind of has control over absolutely everything
so getting this to load into memory is a crucial component without this happening your system
is not going to work now once the kernel has successfully loaded into memory we're then
going to transition to the next phase this is called the kernel initialization phase so once
the kernel has been loaded into memory what it's going to do it's going to load at least in modern
systems system D now system D has a massive responsibility and modern Linux systems it's
going to mount the file systems it's going to also handle the running and stopping of all the
processes on the system but crucially to note is that system D is a newer implementation on older
systems you may see different styles of programs such as sysv init now whether you happen to be
running sysv init or system D essentially the same type of thing is going to happen they're going
to be responsible for controlling those processes that are going to get your system fully up and
running so really as a recap the process is going to be the very first step is going to be the
BIOS which will do our basic checks for hardware the BIOS is then going to try to find the MBR on
some type of media let's say a network drive or a hard drive or a USB the MBR is then going to run
the bootloader so that could maybe be grub 2 and the bootloader is going to be responsible for
loading the kernel into memory so then we have our kernel initialization and the kernel will load
and modern systems at least system D which is going to mount your file system and begin running all
of those essential processes to get your operating system up and running so that really is us for
the basics of the Linux boot process I hope this has been informative for you and I'd like to thank
you for viewing