Hello and welcome to Module 104 for the lyrics. Plus course,
we'll talk about devices, file systems and
you can see here is only 25% of the exam.
We're almost done with the
modules for the first exam, and then we'll get into the 2nd 1 right after this.
So we do have seven different topics that we're gonna cover.
These are all mapped, as I've said before, to the exam objectives that come from Camp Tia.
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.
So starting off with our
the idea is that we've got a disc and we want to create partitions on it.
We can create primary partitions and secondary or extended partitions.
You should know a little bit about some of these commands
in order to be able to take a fresh disc,
creates an partitions on it and create file systems or create swap.
We start off with our master of partition table master boot record.
And this is a table of contents, more or less for the partitions that are on the desk.
And we can see the information based on the number of cylinders that are used to starting cylinder, the ending cylinder
and so on. You can specify your your partitions that way, or you can use human readable
commands. You know, same. Make this partition one megabyte or one gigabyte.
That's probably lot simpler for most folks to, uh, to deal with.
We also know that when when the system is initialized,
partition table of the disc is marked as bootable,
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
so we can start off with the F disc command
not too many options here, but we can go into a disc
and use it as a interactive, menu driven system,
and then we have a few options from the command line as well,
and I'll do this for my boot. disk.
tradition one Marquez bootable. Did you see the little?
and I see it's starting end and cylinder numbers and then I've got S d A. To
my logical value manager Partition
Fire on the D F command
S T A S t a. One shows up here as boot
an SDA, too. Should be this
my route foul system.
So let's let's go in and let's look at a different disc.
I'm just gonna type of disk and then the name of a second discuss S D B.
Now I'm in the menu system M for help.
I can print the partition table like typing p seconds there. There are no partitions on this disk currently,
so let's great once very simple.
Now notice. I do have two options. I can create a a do it partition table with the G command
or a regular partition with end. We'll do one with an first
asks me if I want to make this a primary or extended. I'll pick the default, which is primary
by default, my first sector and already knows that's 2048
or size. Size is easier to deal with. I'll say,
100 em from 100 megabytes.
And now if I print, I can see that that partitions create that can also create a
a good partition table.
I just created new disc label,
and I guess you can tell I've overwritten the other partition that created cause I have to one of the other,
So let's go ahead and
create the partition again.
since I've changed this to a good partition table now I can have up to 128
which is much different than the four that normally supported his primary partitions for non GPT
first Sector is still 2048
and pick 100 megabytes for my size,
and I can print that and see that my partition is now there.
I remember I started with a, uh,
a regular partition table
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,
so I'm gonna go ahead and write this too, despite hitting W.
And Oh, actually, before we do that, let's look at the partition types.
So that was the letter l. And this tells me all the different types of partitions I'm able to create with tools. Pretty
pretty well outfitted with options here.
I will use W to go ahead and write that disk.
If I run f just now on that drive,
I see that I have my 100 meg partition. And it tells me my sector size
and some other items how large it is,
how many sectors I've used.
So the S F disc and FBIS commands congee be lots of different options for
looking at my information on my drive,
I can list my partitions list the sizes
and when I've made changes, I can use park probe
as we see here to go ahead and update the conch.
So let's have a look at that.
This f disc dish, hell
and we can see that Here's my
partition that I created
I can also run this with a dash s
it only knows about that one partition. So that's why I don't get the one number there.
And if I run part probe,
give me a message about my CD. Rahm, that's mounted.
Nothing to worry about their run that with Dash s tickets Summary.
So now it went out and found that new partition that I just created.
And I have one on another desk that we will use here for something else shortly.
So practice around with these commands a little bit, Get yourself familiar.
And now we can talk about making file systems.
So my NK f s command has a very has several different variants.
And that's why we'll look at that
Well, look at that. CAF s files underneath? Yes, the Espen directory.
the option to specify the file system type of the dash T, or we can use
one of the specific M K. F s commands.
We could also turn on journaling with the dash J option
checking for bad blocks.
We can even force a file system mount
several commands and linens, heavy dash F option to force.
And you sometimes need this because there may be situations where the committee wouldn't really be allowed to run,
and as an administrator we could make that judgment call to say that we're going to force it.
We can also make other changes to the file system once it's created, like changing the high notes eyes
or changing the number of I nodes that are available.
And the I note is an important structure because it contains
pointers to files and directories.
And if your file system didn't have enough I nodes and you had a
many, many of numbers off files, you could actually run out
and have certain issues
because of that. So we want to make sure file systems have
an appropriate number of I know DS. If they're gonna be
dealing with large numbers of files,
we can write the superblock. Now You're Super Block is a foul system component that contains a mapping of
bad sectors and other details about the disk itself, and sometimes that gets corrupted.
And in that case, we would want to rewrite it with this dash s option.
And then lastly, we see some options here for
we can use to make swap command
specifying a device we want to turn into a swap device.
I used to swap on command to actually enable it
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.
So let's have a look.
They were getting us off disk.
No, not touch us. I want to use the Dachau.
All right, so I know I've got Dove. Has to be one.
Let's say I want to make a file system there first thing, though. Let's look at s been
m k f s all these files.
So you see, I've got B T r f s e X t to 63 years to four
I could make all these file system is using these specific commands or just use the
Dashti option. So we're gonna make a doubt the e x t three file system on
and it gives me some information here showing me right now it doesn't have a label
I've got information about my number I noticed I was just talking about the store number of storage blocks.
I can see other details.
81 92 blocks per group.
Here's all my super blocs
and you'll see there's five of those.
And that number may change depending on how big the file system is, of course.
And it tells me that mine my information is done.
Now let's say I want to instead of my
Oh, actually, we're to change it.
dash I for I know now I can
It looks changed my number of blocks per group as well, because
now the eye nodes are larger
e I can have some different characteristics from my file system. Because of this,
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.
So it works in very similar ways.
So let's get rid of that
and this one we have to put the J at the end
in order to turn on journaling,
Yep. Creating journal. There we go. So created the journal blocks
and the journal Faisal file system allows you to have some additional recovery features if systems crash or have other kinds of problems.
Now, I'm gonna go ahead and mount this file system.
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.
go ahead and run the Mount Command
There is my file system.
It was 100 megabytes, but we only get
a usable 87 after some file system overhead and so on.
I can run a bad block check
now, it doesn't let me do that because it's mounted. Same. Similarly, I can't run. Ah, File system check.
Um, usually, you can't. We'll see if that works.
You can't continue because of his mountains. All mount amount that again.
Right? She could do this way on Mt.
And I will run the bad block check
that ran very quickly
and basically said there was no problems found
and I can run. Ah, file, system check.
And this goes and looks for inconsistencies in the file system. Tries to identify bad blocks
And maybe maybe I decide I want to have a label for the file system so I can use dash capital hell,
and I'll call it my data.
Now you'll notice that
and this could be convenient for lots of different reasons.
Maybe I want to rewrite my superblock.
So my dash cast capital s
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,
they get allocated at the same way every time for this for that given size of file system.
Okay, so let's explore some of the
You know how a little bit about this as well?
my stc disk. I've got one partition. There s d C. One.
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.
So very simply, I can just run the mix wife command
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
unique identifier for this disk.
And if I run free dash,
it shows me what my swap currently is. If I run swap on Dash s
right now, I've only got my default system swap currently
So once I've run the makes wop command, then I run swapped on,
which turns on swapping for this partition.
And now, if I run swap on dash s,
I see that new partition added. So there's my Dev stc one.
If I want to remove the swamp,
I just want to swap off simple enough
and run swap on again. I can see that it's gone
so very simple to, uh,
create. And you swap
a little bit here about the different file systems atletic supports
and you you should be aware of some of the parameters
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,
except except for us,
they're high performance file system, which also supports journaling and large files
default for sent us and, well, seven So be aware of that,
uh, riser F s is good for small files. It's just better suited for that particular type of
file system for that kind of system requirement, I should say.
Then we have BTR if s
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.
We've got V fat for Windows compatibility swap, which we were just looking at.
And then our last file system type I sold 96 60
That's this S o standard.
Now there are a couple of commands that we should be aware of Parted and G disc.
look at your partitions and also create them. So let's have a peek at that.
So if I run parted dash L, it lists all of my
fall systems. Only partitions
Total size shows me my two partitions. Which one's has the boot flag set.
It's also showing me a dove S t b
So these are other disks that I've added to the to the system.
Now, as before, I can use this as a menu system, so I just type parted and then the distant I'm interested in
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.
I could make a new partition
by running Make part.
and I'll make it the x t four.
So it should show me my, um
uh, cylinder counts and block number accounts.
Well, that one's not showing up here. Okay, that's fine.
I already got a partition here, but I can
great new ones. I could also create labels I can label the the partition of. I want to give it a name
and set various flags.
But right now, I'm not gonna make any changes to that disk,
So we're gonna go ahead and quit.
Then we have G disc.
So I'll run G disc and this is for editing GPT or good
globally, you unique identifier discs. GPT partitions
my boot Discuss D A.
And it tells me that I've got my two partitions. Maybe I'll run this and look at my B disk.
if you type g disc by itself.
It, uh, we'll ask you to prompt for the following
and then I can get into the menu ing system. I can use my question mark for help
and do the typical things here. I can list my partition types that air supported. I can print my current partition table
and I can create a new partition
or delete them as needed.
Is my detailed information by typing letter I
I didn't verify my disk.
So pretty, pretty neat little features all built in here, and you should be familiar with
very cute acquit you should be familiar with the menu system. Makes it a little bit easier to do your work.
Okay, so we talked about F disc G disc also looked as f disc.
so we have some utilities for editing partitions,
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.
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.
All right, Thank you.