1
00:00:06,639 --> 00:00:12,910
Okay, we have just learned how you can mount devices. Now
you need to know how these mounts can be made persistent.

2
00:00:13,730 --> 00:00:16,160
That would go
through etc. Fstep.

3
00:00:16,960 --> 00:00:23,289
So etc. Fstep is the file that makes mounts
persistent and ensures that they get back when you reboot.

4
00:00:24,210 --> 00:00:28,925
On modern systems, this file is used as
an input file to create system demounts in

5
00:00:28,925 --> 00:00:33,640
ignore it, because if you just use etc.
Fstep, systemd will do the rest for you.

6
00:00:34,799 --> 00:00:38,750
In etc. Fstep, you define
your mount in six different columns.

7
00:00:39,530 --> 00:00:41,079
First you refer
to the device.

8
00:00:41,939 --> 00:00:48,519
That can be the name of the device or
the uuid. And that's exactly what we are going to

9
00:00:48,519 --> 00:00:55,099
do. Because device names may change, UUIDs will never
change, and that's what we need for reliable persistent mounts.

10
00:00:55,950 --> 00:01:00,910
Then you need the mount point, which is
the directory where you are going to mount your

11
00:01:00,910 --> 00:01:05,870
device. The file system, which is a file
system type that you've used for formatting and mount

12
00:01:05,870 --> 00:01:10,829
options, dump support or mount order, which
in most cases are not needed at all.

13
00:01:11,810 --> 00:01:15,340
Now it's important that when
you are mounting devices in

14
00:01:15,340 --> 00:01:18,870
etc. Fstep, you use UUID
and not the device names.

15
00:01:19,870 --> 00:01:23,370
I will show you how to do this
from for the device that we have just created.

16
00:01:24,329 --> 00:01:28,349
So the first thing that I need is
to find out the UUID for my devices.

17
00:01:28,890 --> 00:01:33,659
Sudo blkid Every device that has
a file system has a unique

18
00:01:33,659 --> 00:01:38,430
block id and that is the
UUID that we see right here.

19
00:01:39,209 --> 00:01:44,819
And these UUIDs will never change. I'm not
so sure about my device names. I was

20
00:01:44,819 --> 00:01:50,429
surprised that my resized disk appeared as NVMe
0n2 and the new disk appears as NVMe

21
00:01:50,430 --> 00:01:56,040
0n1. And I'm not so sure that after
a reboot is going to be the same.

22
00:01:56,359 --> 00:02:01,849
So I'm going to use the uuid
and then I'm going to open etcfstab

23
00:02:01,849 --> 00:02:07,340
in my editor so that we
can add the mount for the uuid.

24
00:02:07,939 --> 00:02:11,789
As you can see in
the first column, everything that is

25
00:02:11,789 --> 00:02:15,639
mounted is mounted by uuid.
Likewise for my new device.

26
00:02:16,360 --> 00:02:18,969
Now my UUID
has double quotes.

27
00:02:19,729 --> 00:02:21,860
You can keep them, there's
no need to remove them.

28
00:02:22,610 --> 00:02:28,276
I'm going to mount this on files. That
needs to be a unique mount point which I

29
00:02:28,276 --> 00:02:33,943
still need to create. I need to specify
the file system and then there is the mount

30
00:02:33,943 --> 00:02:39,610
options and the other options for column
4, 5 and 6 just use defaults 00.

31
00:02:40,590 --> 00:02:46,737
Now once you are done with your etc step,
you want to test and in order to test

32
00:02:46,737 --> 00:02:52,885
I would suggest you use sudo mount A MNND
A is trying to mount everything in etc fstep

33
00:02:52,884 --> 00:02:59,032
which is not currently mounted and it will complain
if there is any errors preventing from doing so,

34
00:02:59,032 --> 00:03:05,180
which is the case here. We can see
files. Mount point does not exist. That is correct.

35
00:03:05,539 --> 00:03:10,080
I need sudo mkdir
files to create it.

36
00:03:10,599 --> 00:03:12,860
Now I can use
my mount A again.

37
00:03:13,639 --> 00:03:19,959
We do see this hint. Feel free to
ignore the hint for now. The mount has been

38
00:03:19,959 --> 00:03:26,279
done and I'm going to use sudo reboot
to restart my system with the newly mounted partition.

39
00:03:27,000 --> 00:03:31,669
That is the ultimate test that allows me
to verify if everything was done the right way.

40
00:03:32,569 --> 00:03:36,199
I've pressed the escape key so that
you can see a couple of startup messages.

41
00:03:37,060 --> 00:03:41,844
What I'm looking for is if anything appears
in red. But this was so fast. And I

42
00:03:41,844 --> 00:03:46,629
see the GDM login appearing again and. And
that probably means that everything is all right.

43
00:03:47,110 --> 00:03:50,660
So let's open the
terminal and let's verify

44
00:03:50,660 --> 00:03:54,210
that the mount
was indeed successfully performed.

45
00:03:55,090 --> 00:03:56,909
So
sudo lsblk.

46
00:03:58,310 --> 00:04:04,719
That's a typo, but let me regenerate
the sudo token and then do lsblk again.

47
00:04:05,400 --> 00:04:09,605
And what do we see? Well,
we see that it is still NVMe

48
00:04:09,605 --> 00:04:13,810
0n2 and we also see that
the new partition is mounted on files.

49
00:04:15,969 --> 00:04:21,125
So if I would use another check
mount pipe grab N2 P4 then you

50
00:04:21,125 --> 00:04:26,279
can see that the mount is
there and that is what was expected.
