In this demonstration, we're going to go
through the Linux boot process.
It's important to understand the Linux boot process,
especially when you're a system admin,
just in case you get a major error called a kernel panic.
Now, when these errors occur, they require intervention,
so it's important to understand the components
and the makeup of the process,
so you can kind of identify any issues
or where the problem might lay.
Now, as sort of a high-level overview,
what happens when the computer's first turned on
or restarted?
The processor checks for the BIOS or the UEFI,
and the BIOS means it's the Basic Input Output System,
and the UEFI is the more advanced version of the BIOS,
which stands for the Unified Extensible Firmware Interface.
Now, all that really means is the firmware,
is what's hard coded into the processor,
so as soon as the computer is booted,
it has software to run it.
The next thing that the BIOS needs to do is check
for any bootable media.
So, typically, don't look for any external
or internal storage or peripherals, such as USB thumb drives
or DVDs, et cetera.
Once it locates a valid device,
it starts to boot from that system.
The next thing it's going to do is look
for the primary bootloader.
And that's typically going to be on the master boot record.
That's if you're using the BIOS,
or the GUID partition table,
and that's if you're using the UEFI version,
and once it pulls this information, then it's going to start
to load a little bit more information again.
Again, this is how all a boot strap,
so, we're starting from a little bit of information,
a few modules, and we're getting more and more complex.
After we've located the boot loader,
we're going to determine which kernel is required, and then,
we're going to locate all the information for the kernel.
And then we're also going to upload something
called a initrd image, which stands for initial Ram disc.
And what this does is pretty much,
creates a temporary file system
to start loading the other kernel modules
as well as the necessary drivers.
And once the kernel's fully up and running,
next thing we're going to do is mount the root partition,
then, we're going to get started using the operating system.
So just a note, some of the key information, again,
the most important thing is realizing that the BIOS
or the UEFI must be initialized before anything can happen.
And we also have to have viable bootable media,
and then we actually have to load the primary boot loader
from a MBR.
And after the boot loader is complete,
remember, it's going to transfer control over to the kernel.
Now, on newer systems, most people are going to go
with the UEFI and some,
some of the biggest reasons is because also the GPT,
the GUID Partition Table has a lot more advantages
over the legacy, MBR,
because it has a larger maximum storage space
for the partitions,
and it also stores the boot data
in multiple locations for redundancy purposes.
So now you're not running into a issue where,
for example, if you using the BIOS
in the primaries and the first sector gets corrupted,
and now you can no longer load the system.
And one of the last things that's ran is the systemd
and what that does is it just mounts the file system based
off that configuration file that we configured earlier,
the f staff file, and then begins the process
of starting all the services that we're going to need
to run the operating system.
Now, note on a lot of systems today,
especially when everything's becoming more connected
and complex, a lot of organizations today,
they're booting a lot of the operating systems from a NFS,
so a network file share.
We're going to actually go through,
and configure how to set up a network file share
for our server to create a bootable image
to load on multiple machines.
So let's get started with that.
Okay, so, the first thing we're going to have
to do is identify the kernel that we're currently using,
and that's going to be the uname command to r option.
Okay, so we see that version,
now, probably go ahead and make an initial Ram disk.
So that command is going to be sudo, make initial Ram disk.
We use the verbose option to see everything
as it's being processed.
We're going to put it under the boot directory,
init, rd,
so this is going to be the name.
So this portion of the command is just specifying the name.
Now, when we have this dollar character,
it's, lets us use a variable,
and it's going to be the variable that's returned
after we execute this command.
So dot image, so this is going to be the name
of the actual file.
So it's going to be in the boot folder
and it's going to be init rd
with a version dot kernel dot image.
And then, the last specification we must have,
is the actual kernel that we're going to be using.
And again, we can use this variable, uname,
and then we need our r option,
put in our password, and we're going to run it.
Okay, we see we have that complete there.
Now let's just make sure that that actually was created.
Want to list it out.
We go to our booth folder,
and we look at it where it says the date of June 13th.
About halfway down the file,
we'll see that new file was created.
So the image we just created,
it refers to the root file system,
that's going to be temporary loaded
into the memory upon system boot.
Now, we're going to do the same thing,
but we're going to create one with a network file share module.
When they initially boot,
the temporary root system will be coming
from a external device across the network.
So going back to that same command,
so this is just going to add to the option
with network file share V four,
and we're just going to slightly change the name to,
we're going to put network file share,
NFS just for clarification,
okay?
All right now, let's just verify this really quick.
We're going to go back to this boot folder,
and we see they're right next to each other,
so that's easy for us to identify.
Let's make this a little readable here,
and do the human readable, so we can get the bytes for this.
Now, if you look, you'll see that the network file share,
is slightly larger than the initial kernel,
and that lets us know that it introduced a new module
into the initial Ram disc.
Okay, we just walked through how
to create an initial Ram disc image,
and also one with the network file share option,
and I'll see you in the next lesson.