- So, let's start with f disk on dev sdb.
I think we still have some place
to create logical partitions.
I'm using p,
and I'm checking that we have sdb 4,
sdb 4 goes all the way to the end 2 0 9,
and we have available space after the end of sdb 5,
and also before sdb 5
because we removed one of these partitions before.
You know what?
Let's do something funny.
Look carefully, and try to understand.
I'm using N for new.
And it creates partition number 6,
that's okay.
And it wants to create it at starting 0.8392704,
which is actually before sdb 5.
I'm going to accept that,
and I'm going to use the end 104889855,
which is still before sdb 5.
Now the funny thing is, that it's telling me,
partition 6 contains an ext4 signature.
Do you want to remove this signature?
I don't.
What is it telling here?
It is telling that it has found an ext4 file system,
and here it's asking do you want to remove it?
No, I don't.
I want to show you that
by deleting a partition, you don't really delete anything,
and if you just deleted the partition, it's easy to recover.
So now I'm using p and we can see sdb 6.
And the partitions are not in this order.
I don't care about that too much.
I'm going to use this partition using the UUID.
So I'm going to write this, and blkid,
and blkid on sdb 6 is showing me this UUID.
I'm copying the UUID,
and I'm getting into etc fstab.
And in etc fstab, I'm adding a new line,
and I'm telling it to mount this on lesson 12 lab.
And the file system type is ext4,
and the mount options are defaults,
and zero and zero.
And now, I create my lesson 12 lab directory.
I do my mount minus a,
and oh boy, that's disappointing.
Special device UUID doesn't exist.
How is that possible?
Did I make a typo?
Well you know what?
In partitioning, rebooting is always a good idea.
Let's reboot, and let's see how it works out.
Alright, so something obviously didn't go well,
let's troubleshoot.
So, we can see that time out waiting for device,
and then we have the UUID.
You can still see it on top of the screen.
It's a UUID ending fb73.
So, I would say blkid to see if we have fb73.
So fb73 and I'm looking at sdb 5,
and sdb 5 does not have it,
and sdb 6 does have this fb73.
Hmm, that's interesting.
So, the big question is, what is going on here?
Well, in order to troubleshoot,
the troubleshooting is definitely related to the UUID.
I would like to mount this, by UUID
and see if that works.
And if I can mount it manually by UUID,
we can put it in etc fstab.
In order to mount it by UUID from the command line,
that's a little bit challenging, but it should be doable.
Look, if you use blkid,
first I need to isolate the UUID, right?
So, if i grab sdb 6,
we can do that in a more elegant way,
but this is okay with me.
Awk, print,
dollar, 2,
for the second field.
And there we go, we have the UUID.
Hey, that should be possible to do it this way as well,
for lines containing.
And that's also working.
This is more elegant, isn't it?
Grep and awk in the same command.
Hey, why would you wanna do that
if you can do it in one command?
Good, so now I need to mount this UUID
and obviously I'm not going to copy that manually.
I am going to use good old command substitution
which is, dollar, parenthesis,
and we put this entire command between parenthesis,
because you should be able to use mount UUID
equals UUID, and slash mnt.
I'm okay putting it in slash mnt, just to see if it works.
Well, that works.
Well, as this works,
it almost looks as if it was a copy paste error.
But,
based on this,
I think it's a good idea to
redirect the output of this fine command into etc fstab.
There we go.
Let's fix.
Etc fstab again.
And there we have the UUID
and the UUID.
(laughing)
Do you see it?
I see it.
You probably see it as well.
Sometimes, it's just a small thing.
Closing quotes for instance, I think we found it,
so we can remove this one.
But hey,
we didn't lose any time in the troubleshooting
because it was cool troubleshooting, wasn't it?
At the same time, lesson 12 lab, do we have that?
Ls and slash is showing lesson 12 lab,
that is doing alright.
And mount minus A, is that working now?
That is working now.
I want to reboot.
I want to see that this is happening the way it should be
happening, and I'm expecting it to be alright at this point.
So there we go.
We already have the GNOME display manager popping up.
So we are good.
There's just one tiny little thing that I still
need to show you.
Not because we need to,
but because you wanna learn cool stuff, right?
So back to the command line interface,
and let's do an f disk on dev, sdb,
and p for print.
And guess what?
Do you see what's happening here?
Suddenly, the previously known as sda has become sdb.
Now, that's a surprise.
Proves the point of device names changing.
So probably, I need to do an f disk on dev sda,
what happened to my old sdb?
This is my old sdb, and what berks me here
is partition table entries are not in disk order,
that is what I want to fix.
How do we fix that?
Well, we have x for expert options,
and in the expert options use m for help.
And you can see that there is f, fix partitions order.
Just have a look at it right now,
we have sda 5 starting at 104,
and sda 6 starting at 83.
I'm using f, and I'm using r to get back
to the main menu, and then I'm using p,
and then we can see the partition order is fixed.
Doesn't that hurt the way how we are starting things?
Well, it shouldn't.
We do need to reboot though,
because in etc fstab, at this point
we should have nothing but device independent naming.
Doesn't that hurt anything?
No, it doesn't, because in etc fstab
we have nothing but persistent naming at the moment.
UUID, and labels, and dev mapper, cs something:
That's LVM.
We'll talk about LVM in the next lesson.
For now, we are done.