Time
8 hours 30 minutes
Difficulty
Beginner
CEU/CPE
10

Video Transcription

00:00
Hello and welcome to Module 104 for the lyrics. Plus course,
00:05
we'll talk about devices, file systems and
00:08
the file system
00:10
hierarchy standard
00:13
you can see here is only 25% of the exam.
00:16
We're almost done with the
00:19
modules for the first exam, and then we'll get into the 2nd 1 right after this.
00:24
So we do have seven different topics that we're gonna cover.
00:29
These are all mapped, as I've said before, to the exam objectives that come from Camp Tia.
00:35
So we're gonna look att. Lots of different aspects of file systems, how to create them, how to maintain them to get rid of them, how to use swap. Just quotas. Lots of good stuff.
00:47
So starting off with our
00:50
master boot record,
00:53
the
00:54
the idea is that we've got a disc and we want to create partitions on it.
00:58
We can create primary partitions and secondary or extended partitions.
01:03
Uh huh.
01:04
You should know a little bit about some of these commands
01:07
in order to be able to take a fresh disc,
01:10
creates an partitions on it and create file systems or create swap.
01:17
We start off with our master of partition table master boot record.
01:22
And this is a table of contents, more or less for the partitions that are on the desk.
01:27
And we can see the information based on the number of cylinders that are used to starting cylinder, the ending cylinder
01:34
and so on. You can specify your your partitions that way, or you can use human readable
01:42
commands. You know, same. Make this partition one megabyte or one gigabyte.
01:47
That's probably lot simpler for most folks to, uh, to deal with.
01:53
We also know that when when the system is initialized,
01:57
if the
01:59
partition table of the disc is marked as bootable,
02:02
I'm sorry. One of the partitions on that disk is marked is beautiful. That's what we would expect to find the operating system
02:09
so we can start off with the F disc command
02:15
and
02:17
look around
02:21
first bull. Run the
02:23
hope
02:24
not too many options here, but we can go into a disc
02:29
and use it as a interactive, menu driven system,
02:32
and then we have a few options from the command line as well,
02:36
so I can run F disc
02:39
on. I'll do the
02:42
the dash elta list,
02:44
and I'll do this for my boot. disk.
02:46
So there are my two
02:47
partitions
02:50
on Dave s D A
02:52
tradition one Marquez bootable. Did you see the little?
02:55
We'll start there
02:57
and I see it's starting end and cylinder numbers and then I've got S d A. To
03:04
which is
03:05
my logical value manager Partition
03:07
Fire on the D F command
03:14
S T A S t a. One shows up here as boot
03:21
an SDA, too. Should be this
03:23
my route foul system.
03:29
So let's let's go in and let's look at a different disc.
03:35
I'm just gonna type of disk and then the name of a second discuss S D B.
03:42
Now I'm in the menu system M for help.
03:46
I can print the partition table like typing p seconds there. There are no partitions on this disk currently,
03:52
so let's great once very simple.
03:54
Now notice. I do have two options. I can create a a do it partition table with the G command
04:02
or a regular partition with end. We'll do one with an first
04:08
asks me if I want to make this a primary or extended. I'll pick the default, which is primary
04:14
partition, one
04:15
by default, my first sector and already knows that's 2048
04:21
and then I can pick
04:23
either in sectors
04:26
or size. Size is easier to deal with. I'll say,
04:29
plus
04:30
100 em from 100 megabytes.
04:35
And now if I print, I can see that that partitions create that can also create a
04:42
a good partition table.
04:46
I just created new disc label,
04:50
and I guess you can tell I've overwritten the other partition that created cause I have to one of the other,
04:56
huh?
04:59
So let's go ahead and
05:01
create the partition again.
05:05
Still, uh,
05:08
since I've changed this to a good partition table now I can have up to 128
05:12
partitions,
05:13
which is much different than the four that normally supported his primary partitions for non GPT
05:21
tables.
05:23
So a big one
05:25
first Sector is still 2048
05:28
and pick 100 megabytes for my size,
05:34
and I can print that and see that my partition is now there.
05:40
I remember I started with a, uh,
05:44
a regular partition table
05:46
created it, but one of once, I created a good partition table. I overrode the old one, and now I've got a new new partition here to use,
05:54
so I'm gonna go ahead and write this too, despite hitting W.
05:59
And Oh, actually, before we do that, let's look at the partition types.
06:02
So that was the letter l. And this tells me all the different types of partitions I'm able to create with tools. Pretty
06:09
pretty well,
06:11
pretty well outfitted with options here.
06:14
I will use W to go ahead and write that disk.
06:17
If I run f just now on that drive,
06:25
I see that I have my 100 meg partition. And it tells me my sector size
06:30
and some other items how large it is,
06:33
how many sectors I've used.
06:40
So the S F disc and FBIS commands congee be lots of different options for
06:46
looking at my information on my drive,
06:48
I can list my partitions list the sizes
06:54
and when I've made changes, I can use park probe
06:57
as we see here to go ahead and update the conch.
07:00
So let's have a look at that.
07:06
This f disc dish, hell
07:11
s t b
07:13
and we can see that Here's my
07:15
gpt
07:17
partition that I created
07:18
S t B one.
07:26
I can also run this with a dash s
07:28
option.
07:30
Show me the size
07:32
it only knows about that one partition. So that's why I don't get the one number there.
07:39
And if I run part probe,
07:42
give me a message about my CD. Rahm, that's mounted.
07:46
But that's okay.
07:47
Nothing to worry about their run that with Dash s tickets Summary.
07:56
So now it went out and found that new partition that I just created.
08:01
And I have one on another desk that we will use here for something else shortly.
08:05
So practice around with these commands a little bit, Get yourself familiar.
08:11
And now we can talk about making file systems.
08:13
So my NK f s command has a very has several different variants.
08:20
And that's why we'll look at that
08:24
directory.
08:24
Well, look at that. CAF s files underneath? Yes, the Espen directory.
08:30
You'll see. We have
08:31
the option to specify the file system type of the dash T, or we can use
08:37
one of the specific M K. F s commands.
08:41
We could also turn on journaling with the dash J option
08:43
checking for bad blocks.
08:46
We can even force a file system mount
08:48
several commands and linens, heavy dash F option to force.
08:52
And you sometimes need this because there may be situations where the committee wouldn't really be allowed to run,
08:58
and as an administrator we could make that judgment call to say that we're going to force it.
09:03
We can also make other changes to the file system once it's created, like changing the high notes eyes
09:11
or changing the number of I nodes that are available.
09:13
And the I note is an important structure because it contains
09:18
pointers to files and directories.
09:20
And if your file system didn't have enough I nodes and you had a
09:24
many, many of numbers off files, you could actually run out
09:30
and have certain issues
09:31
because of that. So we want to make sure file systems have
09:35
an appropriate number of I know DS. If they're gonna be
09:37
dealing with large numbers of files,
09:41
we can write the superblock. Now You're Super Block is a foul system component that contains a mapping of
09:52
bad sectors and other details about the disk itself, and sometimes that gets corrupted.
09:58
And in that case, we would want to rewrite it with this dash s option.
10:03
And then lastly, we see some options here for
10:05
dealing with swap
10:07
we can use to make swap command
10:09
specifying a device we want to turn into a swap device.
10:13
And then
10:15
I used to swap on command to actually enable it
10:18
You could enter. I'm sorry. You can edit the F s tabbed file so that the swamp will be available when the system reboots.
10:26
So let's have a look.
10:33
All right. Um,
10:35
I wanted to
10:37
They were getting us off disk.
10:39
No, not touch us. I want to use the Dachau.
10:46
All right, so I know I've got Dove. Has to be one.
10:48
Let's say I want to make a file system there first thing, though. Let's look at s been
10:54
m k f s all these files.
10:56
So you see, I've got B T r f s e X t to 63 years to four
11:03
excess m s. Does
11:05
I could make all these file system is using these specific commands or just use the
11:11
Dashti option. So we're gonna make a doubt the e x t three file system on
11:18
duh S d b one.
11:22
Very simple to do,
11:24
and it gives me some information here showing me right now it doesn't have a label
11:28
linens file system.
11:31
I've got information about my number I noticed I was just talking about the store number of storage blocks.
11:39
I can see other details.
11:43
81 92 blocks per group.
11:46
Here's all my super blocs
11:50
and you'll see there's five of those.
11:52
And that number may change depending on how big the file system is, of course.
11:58
And it tells me that mine my information is done.
12:01
Now let's say I want to instead of my
12:07
my i knowed size
12:13
right now it is.
12:18
Oh, actually, we're to change it.
12:20
Two
12:22
So m k e to F s
12:26
dash I for I know now I can
12:31
make that change.
12:39
It looks changed my number of blocks per group as well, because
12:43
now the eye nodes are larger
12:48
e I can have some different characteristics from my file system. Because of this,
12:52
we can also enable journaling. So I'll go back to my m k E to F s. I'm k e to f. S is a variation of m k Confess command that's intended for E x t file systems.
13:03
So it works in very similar ways.
13:09
So let's get rid of that
13:13
and this one we have to put the J at the end
13:15
in order to turn on journaling,
13:20
and it looks like
13:26
Yep. Creating journal. There we go. So created the journal blocks
13:31
and the journal Faisal file system allows you to have some additional recovery features if systems crash or have other kinds of problems.
13:39
Now, I'm gonna go ahead and mount this file system.
13:43
I'll make a directory called it. I think I already have this directory, but we'll see what happens. My data. Yeah, it's pretty there.
13:50
So I'm gonna
13:50
go ahead and run the Mount Command
13:58
if I run d f.
14:00
There is my file system.
14:03
It was 100 megabytes, but we only get
14:05
a usable 87 after some file system overhead and so on.
14:13
I can run a bad block check
14:18
now, it doesn't let me do that because it's mounted. Same. Similarly, I can't run. Ah, File system check.
14:24
Um, usually, you can't. We'll see if that works.
14:31
You can't continue because of his mountains. All mount amount that again.
14:35
Right? She could do this way on Mt.
14:39
And I will run the bad block check
14:45
that ran very quickly
14:46
that she option
14:48
and basically said there was no problems found
14:54
and I can run. Ah, file, system check.
15:01
And this goes and looks for inconsistencies in the file system. Tries to identify bad blocks
15:07
and so on.
15:09
And maybe maybe I decide I want to have a label for the file system so I can use dash capital hell,
15:15
and I'll call it my data.
15:22
Now you'll notice that
15:26
label is specified,
15:28
and this could be convenient for lots of different reasons.
15:33
Maybe I want to rewrite my superblock.
15:37
So my dash cast capital s
15:43
so I rewrote that
15:46
the numbers look like they came back. The same stars where the super locks are stored. And that's pretty typical because you're not, um,
15:56
they get allocated at the same way every time for this for that given size of file system.
16:03
Okay, so let's explore some of the
16:07
swamp commands.
16:07
You know how a little bit about this as well?
16:11
Uh, I have
16:18
my stc disk. I've got one partition. There s d C. One.
16:22
And let's say I want to use this for swap because my systems having trouble dealing with memory usage on add some more swamp.
16:29
So very simply, I can just run the mix wife command
16:33
on that partition
16:36
tells me it wipes the old spot second. Sure, if that was one there gives me some information about fat. There's no label. I've got my u U I d
16:44
unique identifier for this disk.
16:48
And if I run free dash,
16:51
it shows me what my swap currently is. If I run swap on Dash s
16:56
right now, I've only got my default system swap currently
17:00
usable.
17:02
So once I've run the makes wop command, then I run swapped on,
17:07
which turns on swapping for this partition.
17:11
And now, if I run swap on dash s,
17:17
I see that new partition added. So there's my Dev stc one.
17:21
If I want to remove the swamp,
17:23
I just want to swap off simple enough
17:27
and run swap on again. I can see that it's gone
17:30
so very simple to, uh,
17:33
they're simple too
17:36
create. And you swap
17:40
a little bit here about the different file systems atletic supports
17:44
and you you should be aware of some of the parameters
17:48
in the e X T file system. Range 64 is obviously the best of those three. They've made improvements since e x t two came out with the X t three that supported journaling, for instance,
18:02
except except for us,
18:03
they're high performance file system, which also supports journaling and large files
18:10
default for sent us and, well, seven So be aware of that,
18:15
uh, riser F s is good for small files. It's just better suited for that particular type of
18:21
file system for that kind of system requirement, I should say.
18:26
Then we have BTR if s
18:29
So is it says here that we don't need partitioning tools for this, so it's a little bit different the way it works.
18:33
We've got V fat for Windows compatibility swap, which we were just looking at.
18:37
And then our last file system type I sold 96 60
18:41
which is CD ROM's
18:44
DVDs.
18:45
That's this S o standard.
18:51
Now there are a couple of commands that we should be aware of Parted and G disc.
18:56
He's let you
18:57
look at your partitions and also create them. So let's have a peek at that.
19:07
So if I run parted dash L, it lists all of my
19:14
fall systems. Only partitions
19:21
send this to Maur.
19:26
So there's my disk.
19:26
Total size shows me my two partitions. Which one's has the boot flag set.
19:33
It's also showing me a dove S t b
19:37
and STC.
19:40
So these are other disks that I've added to the to the system.
19:51
Now, as before, I can use this as a menu system, so I just type parted and then the distant I'm interested in
19:57
in time, I hope,
20:00
and we'll see here that I can run a print command shows me my partition. It knows this one's currently set for Lennox swap.
20:08
I could make a new partition
20:11
by running Make part.
20:14
Oh,
20:15
say its primary
20:18
and I'll make it the x t four.
20:26
Oh, I need my
20:30
oh, mama,
20:37
print this again.
20:44
So it should show me my, um
20:48
uh, cylinder counts and block number accounts.
20:52
So, for a sec.
20:56
Well, that one's not showing up here. Okay, that's fine.
21:02
There it is.
21:07
So, um,
21:07
I already got a partition here, but I can
21:11
great new ones. I could also create labels I can label the the partition of. I want to give it a name
21:18
and set various flags.
21:22
But right now, I'm not gonna make any changes to that disk,
21:25
So we're gonna go ahead and quit.
21:30
Then we have G disc.
21:33
So I'll run G disc and this is for editing GPT or good
21:37
globally, you unique identifier discs. GPT partitions
21:42
So specified
21:48
my boot Discuss D A.
21:51
And it tells me that I've got my two partitions. Maybe I'll run this and look at my B disk.
22:00
No. So we could see
22:03
if you type g disc by itself.
22:07
It, uh, we'll ask you to prompt for the following
22:10
for the
22:12
just name
22:15
and then I can get into the menu ing system. I can use my question mark for help
22:19
and do the typical things here. I can list my partition types that air supported. I can print my current partition table
22:30
and I can create a new partition
22:33
or delete them as needed.
22:40
Is my detailed information by typing letter I
22:44
I didn't verify my disk.
22:45
So pretty, pretty neat little features all built in here, and you should be familiar with
22:52
the, um,
22:56
very cute acquit you should be familiar with the menu system. Makes it a little bit easier to do your work.
23:04
Okay, so we talked about F disc G disc also looked as f disc.
23:08
Oh,
23:11
so we have some utilities for editing partitions,
23:14
maybe doing some maintenance on them. Then we saw how simple it is to make file systems and swap and how it easy, Easy just to enable swap.
23:22
Next, we'll talk about maintained the integrity file systems were getting more into F S, E K. And some of the other commands are available.
23:29
All right, Thank you.

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