1
00:00:00,000 --> 00:00:12,920
In this video, I'll show you how to create MBR primary partitions using the fdisk utility.

2
00:00:12,920 --> 00:00:17,080
In case you are wondering, do we still need to know about that? Yes, because you want

3
00:00:17,080 --> 00:00:23,719
to pass Linux Plus and also because in some systems you'll still encounter MBR partitions.

4
00:00:23,719 --> 00:00:27,920
You know, some Linux systems stay around for a long time, and if you want to be certified

5
00:00:27,920 --> 00:00:33,919
to manage them, you better have some basic skills regarding MBR. For this demo, I've

6
00:00:33,919 --> 00:00:40,480
used my virtualization layer to add some storage. If we use LSB-LK, we can find information

7
00:00:40,480 --> 00:00:45,200
about it. Hey, talking about changing device names, do you see that? I was just talking

8
00:00:45,200 --> 00:00:51,240
about it. And the device previously known as dev-nvme-0-n1 has now suddenly changed

9
00:00:51,240 --> 00:00:59,160
to dev-nvme-0-n3. But fortunately, FSTEP is using UUIDs, and these UUIDs are written

10
00:00:59,160 --> 00:01:05,320
on the device itself, so that will always correctly be detected. I'm going to use fdisk

11
00:01:05,320 --> 00:01:13,720
on dev-nvme-0-n1, and that is my first disk. Always make sure that you use your partitioning

12
00:01:13,720 --> 00:01:20,360
utility on a disk. You can't use it on a partition. Now, we can see that AFRIS is telling us that

13
00:01:20,360 --> 00:01:26,839
the device does not contain a partition table, and it created the new DOS or MBR disk label,

14
00:01:26,839 --> 00:01:33,000
and that's exactly what we want. You can also use M for help. You should see that as M for

15
00:01:33,000 --> 00:01:38,760
menu, because you can see all the useful options in this menu. And there's a couple of options

16
00:01:38,760 --> 00:01:45,720
that I like. To start with, the option P. Let me put it on the top of my screen. P is for print.

17
00:01:46,360 --> 00:01:52,599
So here we can find some generic disk information, including that this is a 20 GB disk,

18
00:01:52,599 --> 00:01:58,120
this is the amount of bytes, and we are using sectors with the size of 512 bytes.

19
00:01:58,120 --> 00:02:04,040
Now, let me use N to create a new partition. And there we have the choice between primary

20
00:02:04,040 --> 00:02:10,440
or extended. Remember, in MBR, you can only address four partitions. But as this is the first one,

21
00:02:10,440 --> 00:02:16,360
I'm going to start with a primary partition, partition number one. The first sector starts

22
00:02:16,360 --> 00:02:22,360
at 2048. In case you are wondering, why doesn't it start at the beginning? Well, there's a simple

23
00:02:22,360 --> 00:02:30,440
explanation. Every disk, the first megabyte is reserved for metadata storage, administrative

24
00:02:30,440 --> 00:02:37,240
information about what you are doing on your disk. So your first partition will always start at MB

25
00:02:37,240 --> 00:02:42,360
number one. Then it's asking for the size. In the last sector, well, I'm going for the plus

26
00:02:43,240 --> 00:02:52,199
size in K, M, G, T, or P. So I'm using plus one uppercase G. Don't forget, Linux is case sensitive.

27
00:02:52,199 --> 00:02:57,720
Lowercase G is really not going to work. And now we can see that the new partition one of type

28
00:02:57,720 --> 00:03:03,880
Linux and a size of one gigabyte has been set. It's a good idea there to verify that using P

29
00:03:03,880 --> 00:03:10,440
for print partition table. And here we can see that the device NVMe 0 and 1P1 has been added.

30
00:03:11,080 --> 00:03:19,080
If that is what you wanted, use W to write, and then use LSB OK to verify that the new partition

31
00:03:19,080 --> 00:03:26,199
is visible. And as you can see, it is visible. So mission accomplished. We still need to create

32
00:03:26,199 --> 00:03:32,440
a file system on top of it. I'm showing you how to work with file systems in one of the upcoming

33
00:03:32,440 --> 00:03:33,559
videos.

