Time
8 hours 30 minutes
Difficulty
Beginner
CEU/CPE
10

Video Description

Introduction

Welcome to the Boot the System Practice Lab. In this module you will be provided with the instructions and devices needed to develop your hands-on skills.

Learning Outcomes

In this module, you will complete the following exercises:

  • Exercise 1 - Boot the System

After completing this lab, you will be able to:

  • Log into a Linux System
  • Configure boot menu in Ubuntu
  • Check boot events in the log files

Exam Objectives

The following exam objectives are covered in this lab:

  • LPI: 108.2 System logging
  • CompTIA: 3.4 Given a scenario, implement logging services.

Lab Duration

It will take approximately 1 hour to complete this lab.

Exercise 1 - Boot the System

Booting a system refers to initialization various parameters of the system or any hardware device. The booting process loads various files and libraries from the operating system.

In this exercise, you will understand the files used in the system bootup process and boot events.

Learning Outcomes

After completing this exercise, you will be able to:

  • Log into a Linux System
  • Configure boot menu in Ubuntu
  • Check boot events in the log files

Video Transcription

00:01
All right, So our next part of module 101 is booting the system.
00:06
So we'll look at some of the options that you have for telling the system how to boot and how you which currently would like to use and things of that nature.
00:15
You also wouldn't be expected to know what the boot sequence entails.
00:18
There will definitely be questions on the exam asking about this.
00:23
Well, look at
00:25
system five in it
00:27
commands, which are more the legacy
00:30
way of doing things compared to system D, which is the new way of doing things
00:36
also touch on the upstart utility.
00:39
Well, look at boot events and various log files and we see it. We've got some commands here
00:46
and some files and things that will be touching on as we get through this chapter.
00:54
Now Lennox supports grub, which is the grand unified
00:59
boot loader,
01:00
and it's kind of a nice little acronym. And what this means is that we've got the ability to have multiple curdles
01:08
available for booting on a particular system.
01:11
This is very useful because sometimes
01:15
as administrator, you're going to need to make changes to the colonel,
01:19
and usually when that happens, what we want to do is
01:23
build a new colonel
01:26
and also retained the current colonel
01:30
this way if we if we boot up in the new colonel and there's a problem, something's not right.
01:34
We could always reboot from the previous Colonel and go back and make some changes and try again.
01:44
So this grub make unfit command is just a sample here showing. Once I make some changes to the
01:52
the default settings,
01:53
I can generate a new CONFIG file
01:56
and have that new colonel show up in my boot menu, which will see here in just a little bit.
02:02
Now, when Santos gets gets installed
02:07
first, the system will do the
02:10
inspection of the BIOS.
02:13
We'll talk a little bit about the power on self test,
02:17
and if you were unsure about the compatibility of your system, you can always go to the sent US hardware compatibility site.
02:29
You bring this up
02:30
really quick,
02:32
and this is very handy to be able thio
02:36
to determine if I want to use something like a graphics card. Well, which ones can I use?
02:42
Hello.
02:44
That's not showing much detail there,
02:47
but it's trying to tell me of all the different versions of devices.
02:52
How do I determine which ones are compatible with my intended?
02:57
Hello.
03:01
And I can also specify how I want the colonel to be accessible. If you remember, when we ran the
03:09
de Message Command
03:12
and
03:15
one of the other commands, we saw some of the Colonel parameters,
03:17
like specifying where the route.
03:21
Oops, sorry about that, where the route
03:23
partition is located, or even specifying that it's read only.
03:29
So if my boot partition is read only that's a good thing, because I blew the operating system from Avery. The only data
03:37
I don't have a chance to write to that partition. So it's less chance of any security problems or any data corruption.
03:46
And I have various parameters, which I can specify for the colonel
03:50
to suit my various needs. That the quiet option is nice because, as it says,
03:54
I won't see any messages that are not considered critical, which
03:59
minimizes the amount of
04:01
information I see on the screen or in my log files.
04:05
I can also define the buffer size for the log the colonel log.
04:12
This might be important as far as limiting the buffer size in order to prevent a system from running out of space if it was built with without a lot of consideration for growth.
04:24
In the last section. We also saw Mod probe
04:27
being able to see which kernel modules are currently loaded and being able to
04:31
add and remove those as needed.
04:35
And if I system crashes
04:38
and the colonel dumps its contents to contents of memory to disk, I want to be able to specify where that crash colonel data should be located.
04:51
So if I go back to my
04:54
the next machine,
05:00
when the first things that want to do is go to the etc default directory,
05:06
you'll notice I have a file here for grub.
05:11
Now that's a default is a, um,
05:15
just what it sounds like. The etc. Directory in general is for configuration files,
05:18
but I can define a default
05:20
config file for various different commands
05:24
like the grub configuration are adding a user as we see.
05:29
But let's look at some of these parameters really quick. First, we have our time out.
05:32
This is the amount of time in seconds that
05:35
the boot menu will give you to make a choice. Either you wait the five seconds in the boots automatically, or within five seconds. You interrupt the boot
05:44
by clicking on the screen and moving one of the arrow keys to move the cursor up and down. We'll see that here in a little bit.
05:53
I can also define where my output of my
05:57
terminal goes to the consoles and default settings. That's pretty typical.
06:00
And my crash girl
06:02
So I can tell it that underneath my
06:06
spot
06:09
my route volume, I'm gonna configure
06:12
an area for saving the memory when the system crashes.
06:16
So a couple settings there to look at
06:28
now what I just did here was a cat command on Prak. Prak slashed me in line.
06:34
This shows me what the command line looks like
06:38
to generate this. This colonel, I can see that my my route partition is attached to slash dev slash mapper Santos route.
06:48
It has read only,
06:50
and I can see that my crash colonel will automatically be generated. That's what the auto setting means in this case
06:58
tells me that it's it's a quiet setting, has been able to, so I don't see anything from the Colonel that's that's non critical,
07:06
and it's a little bit hard to tell because the year make the monitor full screen
07:12
and also specifies my language variable showing me that I'm using English language
07:17
in the U. T. Have eight character of coding format.
07:25
So these are nice little details about my
07:28
curls that are only visible once I've booted up.
07:36
And usually when you're in my experience, when I'm changing the colonel's because you're trying to do something to
07:43
modify the way the system allocates resources, maybe you're tweaking memory settings or tweaking some of your storage settings, trying to get better performance. Overall,
07:55
it's also mine
07:57
relate to how memory is used,
08:00
so a RAM desk is just what it sounds like. It's a portion of disk
08:05
which can be used like memory when the system boots
08:09
so the Ram disk
08:09
gets loaded by the grand unified boot loader grub,
08:15
and it runs has been in it.
08:18
And the scripts that are in this directory
08:22
we'll look for very service is that that are required to start up the system, start of the various components
08:28
and each each script in this in this directory will have some purpose with assistant things like starting networking, starting the the connection of the drivers to my hardware devices and so on.
08:43
All this is done in order to get ready to mount the root file system, which is known as slash
08:52
again. These things in blue are usually
08:54
config files or paths or commands.
09:00
Now the the root file system has to be monitoring boot because this is where
09:07
all of my subsequent file systems will use as a reference point for their mount points.
09:13
And, of course, we have thio get our operating system files from from this area,
09:20
the drivers that the operating system needs to talk to the hardware things such as *** controllers, host bus adapters, HBs scuzzy devices.
09:30
The operating system can't talk to those device to those hardware devices until the driver's loaded.
09:35
The driver is an intermediary software that
09:39
that allows the opera system to send commands
09:41
to a hard disk or to a video display adapter or network hard
09:46
and tell it to do something or ask it for information.
09:50
So when the system goes through its boot process,
09:54
one of the first things that happens is the power on self test.
09:58
We're all familiar with this when you turn out a computer, especially
10:01
PC based systems you hear. Beep typically,
10:05
and you get a bunch of diagnostic information on the screen.
10:09
And what this is intended to do is to do a quick check of all the different required hardware components to make sure that they're all working.
10:16
I need to display on the keyboard and probably need a mouse.
10:20
I need storage. I need to have access to Maya bios,
10:24
and that's what the power on self test does. It doesn't quick check of all those things.
10:28
Initialize is all the hardware to get ready for the first stage of the boot.
10:35
So the first age for grub is loaded from the master boot record. That's what the M B. R stands for.
10:41
This will get all the drivers for the file system
10:46
loaded into memory so that that
10:48
they could be ready for the Mount Point to actually take place.
10:52
And
10:54
the first I first stage of grub also gets ready to load the second stage.
10:58
Now the second stage of grub.
11:01
Well, actually, look at the config file
11:03
and that that command line that we saw that that's what actually gets inspected to determine
11:11
which colonel is going to be loaded and some of the parameters, like read only or the quiet parameter to limit non critical messages.
11:22
The Ram disk. It's loaded. Then what this means is that
11:26
some of the colonel
11:28
it has to be still loaded from the disk. So we need to ram. Just have some temporary storage in the physical memory of the system in order to get ready for the actual colonel to be initialized
11:39
When the colonel's brought from the disc. It's in a compressed format, so it has to be decompressed.
11:45
And then whatever command line arguments we saw that
11:48
previous example would now be,
11:50
uh,
11:52
applied to that colonel being loaded into memory. The read only feature the quiet feature and so on.
12:01
But the colonel loads the operating system takes the device drivers,
12:07
and we'll initialize them so that they can run
12:09
and go talk to all the bits of hardware, your video display adapter, network, hard storage adapter and so on.
12:20
So in it ram a fast. This is initializing the Ram file system.
12:26
This this portion that's loaded from the disc will now
12:30
take care of the subsequent tasks of getting kernel modules that we saw when we did that mind probe Command.
12:37
All those will now be loaded. All the ones that are configured to be loaded anyway
12:41
will be loaded into memory. And then finally, the root file system gets mounted.
12:46
Once that happens,
12:48
the ESPN and IT
12:48
script will be run,
12:50
and
12:52
system will continue its boot process.
12:56
So let's have a quick look.
13:01
Well, look in the s band director. There's quite a few things here we'll talk about
13:07
with these files are
13:09
what some of these files are later.
13:13
But we noticed that the unit
13:16
program actually has a link
13:18
to system deep, which will also compare to
13:22
the previous version of more the legacy way of doing things
13:26
for for Linux systems, her UNIX systems.
13:33
So, in it again, uh,
13:35
if you were running system five
13:39
that a nicked process will now go load all the other,
13:45
uh,
13:46
components of the operating system. So it really is the first main
13:50
process or program that runs when the system goes to the boot process.
13:54
Now we
13:56
compare,
13:58
uh, system five
14:01
books on a second.
14:05
If we compare the system five way of doing things with
14:09
system D, which is the newer way we've got some nice comparisons to see how these things translate back and forth.
14:16
So if you're more familiar with more legacy unit systems Olynyk systems, you might recognize a service command.
14:24
I can start, stop and restart and reload a service.
14:28
Or, if I'm running in a more modern system, which is System D based
14:33
I run system control system. C T l.
14:35
Very similarly just I can start, stop and reload same way
14:41
so I could run a status command in both cases, See if the service is running
14:48
underneath the RC dot de anata D folder on wreath, etc.
14:54
We can see it all. The system five
14:58
under commands
15:00
on a, uh,
15:01
system D environment like like Santos is
15:05
I can run this system control with student files and say, Show me all of the service's that are available on this system, which I can start and stop with,
15:15
uh, the script commands.
15:16
So I could reference
15:18
service underneath this folder and tell it to start and stop. Very similar to what? Using the service command of the System Control Command.
15:28
I can also,
15:31
uh, determine if a
15:33
service is going to be started and stopped automatically when the system Boots
15:37
stopping on a Mac was coming up and under understood. No brainer kind of default, sonny,
15:43
but only certain service's are going to be started automatically. I want to be very selective about that, so I don't start more service is that I need, and we'll talk about that a little bit more detail when we get him to the security considerations and other sections.
15:58
I can also determine which run levels the service will be operational.
16:03
Certain service's might only be needed at one level three, for instance, and I don't need the run level four
16:08
so you can configure that in order to
16:12
Evan. Ah, more customized
16:15
approach to how your system is configured and what it does when it boots
16:23
Now upstart.
16:26
As it says here, this is a replacement for in it, and it was considered a little bit too inflexible. Another reason why System D was
16:33
a good replacement,
16:37
and so the etc innit Tab and the Nick directory underneath at sea probably doesn't have much information in it for a modern system that we can go take a quick look.
16:55
So there's my new tab,
16:56
and as it says, this is no longer used when you're have system be available.
17:03
But some of these legacy files still exist,
17:06
and you should know a little bit about it in case you're in a situation where,
17:11
um, I'm sorry. It's
17:12
in case you're in a situation where you're working on older system and you want to be able to
17:19
do some work
17:25
now when the system boots.
17:26
One of the things that we probably would be considering is,
17:30
where can we find different details about what happened during that boot?
17:36
We've already looked at a D message.
17:38
This is the things that would go to the console. These air current related messages,
17:44
and we'll also look at the slash bar slash long boot log and our long messages
17:49
generally for Linux systems. Most of your logs are contained under slash bar slash Log,
17:55
and that's that's a pretty typical convention
17:59
and makes
18:00
makes for a, uh,
18:02
a little bit of ease for finding an information that your event that you're interested.
18:07
So if I go too far a log,
18:08
do a long listing here, we can see there's quite a few items.
18:11
This is where all the logs are contained for various things they're going out of the system.
18:17
There's d message,
18:18
but I will also want to look at the boot log
18:25
so boot Long doesn't have anything in it. That's okay
18:29
if I look at messages, which is kind of a general purpose. Catchall
18:33
messages has quite a bit of data,
18:37
so I'm going through several screens here. You can see there's all kinds of details about boot information
18:45
and maybe I'm interested in.
18:51
Maybe I'm interested in
18:53
trying to find something
18:56
specific so I can count the messages file. And I can pipe that to grab Dash I and look for the word error.
19:07
Clear the screen, Run that again.
19:11
So I got a few lines with some errors. Not true, buddy. Uh,
19:15
I could also
19:18
look for the word fail
19:22
Quite a few of those
19:26
Arabia. I'm interested in something more specific, like a
19:30
events that happened in a particular time, like 14. 39.
19:36
So you can see how easy it is to use the grub command.
19:40
All the items that get matched return and they show up in red.
19:45
Very useful.
19:51
Now, these messages that we see related to boot they don't look like much at this point because we're not troubleshooting. We're not looking for anything in particular. We're just trying to find where we were. We might look.
20:02
And as I've written here,
20:03
generally speaking, things that indicate failure are often more interesting than things that indicate success.
20:15
So these are some of the commands that we've investigated for this section.
20:19
Make sure you do spend a little bit of time practicing with these
20:23
as the end of the boudin system. Modules are the section with this module.
20:29
And then for our last bit, we're going to
20:32
chain drone levels
20:33
who targets and shut down the system
20:40
I have seen in the next section.

Up Next

CompTIA Linux+

Our self-paced online Linux+ training prepares students with the knowledge to become a certified Linux+ expert, spanning a curriculum that covers Linux maintenance tasks, user assistance and installation and configuration.

Instructed By

Instructor Profile Image
Dean Pompilio
CEO of SteppingStone Solutions
Instructor