Hello, and welcome to this Pluralsight presentation.
My name is Andrew Mallett, and I'm here as your instructor to help guide
you through the module, Managing the Linux Boot Process.
So when you're ready with your engine started, we shall begin. We're
going to be taking a look at booting to the Linux kernel.
Now, we have the GRUB, the Grand Unified Bootloader,
so we're going to take a look at that and how we can make adjustments to it.
GRUB can be stored in the master boot record if we're using traditional
style partition tables. We have, then the RAM disk. The RAM disk is our
initramfs, and this loads drivers to access our root filesystem and the
kernel. We locate GRUB from our master boot record, and from it, we find
entries that can choose to load our RAM disk and then the kernel. We'll
look at the default configuration for GRUB and how we can change those
settings, as well as using grubby to make changes to other entries.
And we'll also investigate the idea of a kernel panic.
What is a kernel panic and how do we recover from a kernel panic?
So a lot of really good things that I hope you're going to
really absorb and enjoy during this module.
Now the very first thing that GRUB needs to do is
load our RAM disk, our initramfs, the initialization RAM filesystem.
Now with this, we can provide access to our root filesystem
through drivers that are not built into the kernel.
Generally, we don't want all possible drivers to be built into the
kernel. That would make it absolutely massive, so the kernel needs to
load drivers. But to be able to load drivers,
it has to have access to the root filesystem.
So the initramfs is compiled for your system to give access
to the kernel to the root filesystem.
The kernel itself is what we know as Linux. It is our core operating system.
And as we said before, once the kernel loads,
it will load the drivers that it needs to access the hardware on your system.
So we need the ramfs to provide access to the root filesystem, but once
we've got that, we're able to load all of the other drivers.
Now we're going to dive straight out for our first demonstration, a
demonstration where we're working on our Alma Linux 8.5 system and
taking a look at our /boot directory.
Come on.
Why don't you join me?
And here we are working on our Alma Linux 8.5 system.
And why don't we go through and take a look, as I said,
inside of our boot directory to see if we can locate the
kernel and RAM disk? As I list this,
we can see with the prefix vmlinuz, we have two kernels. One is for
our rescue system, and we'll see more on that later, and we can see,
then our current kernel, 4.18. Associated with those kernels, we
also have the initramfs files,
the initialization RAM disk, and it's these RAM disks that have access to
the drivers for the root filesystem, and again, we'll see more on these as
we go through. During the boot process, we load the initramfs first, and
then the kernel. As we, though update our system, we will have more kernels
and RAM disks being added.
We're able to go through and see this by running a yum update and checking
that we can get a later kernel. So let's give this a whirl, so sudo and yum
update. Now you might not have any updates available for your system, so a
lot just depends on how up to date it is. But when we look at all of the
packages that can be updated,
we see that three are going to be installed from fresh, and
we can see kernel‑core and kernel‑modules.
But if we scroll back up our screen, we should see we are installing a
fresh kernel. The kernel package is never updated,
only ever installed from fresh, so we will have multiple kernels installed.
I can set yes to go ahead with this, and then for the sake of not you
staring at screens watching stuff happening, we'll allow the installation
to run ahead. Now when I list the boot directory,
we can see, then that I have new rescue systems,
and a new kernel, and new ramfs.
We can always check the current version of the kernel that we're running
using uname ‑r, and we can see that it ends in 2.1.
The newer one added was 7.1.
Now we have also made an automatic update to the GRUB
bootloader to create a new entry.
The new kernel will be the default entry. And as I then go
through and reboot and connect back into my Alma Linux
system once it has rebooted, when I now go through and check the running kernel,
uname ‑r, we can see now that we're using the 7.1 release of our kernel, the updated kernel.