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,700 to pass Linux Plus and also because in some systems you'll still encounter MBR partitions. 4 00:00:23,700 --> 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,900 to manage them, you better have some basic skills regarding MBR. For this demo, I've 6 00:00:33,900 --> 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,220 about it. Hey, talking about changing device names, do you see that? I was just talking 8 00:00:45,220 --> 00:00:51,259 about it. And the device previously known as dev-nvme-0-n1 has now suddenly changed 9 00:00:51,259 --> 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,360 on the device itself, so that will always correctly be detected. I'm going to use fdisk 11 00:01:05,360 --> 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 FVS is telling us that 13 00:01:20,360 --> 00:01:27,099 the device does not contain a partition table, and it created a new DOS or MBR disk label, 14 00:01:27,099 --> 00:01:32,940 and that's exactly what we want. You can also use M for help. You should see that as M for 15 00:01:32,940 --> 00:01:38,820 menu because you can see all the useful options in this menu. And there's a couple of options 16 00:01:38,820 --> 00:01:45,220 that I like. To start with, the option P. Let me put it on the top of my screen. P is 17 00:01:45,220 --> 00:01:51,199 for print. So here we can find some generic disk information, including that this is a 18 00:01:51,199 --> 00:01:56,199 20-gigabyte disk. This is the amount of bytes, and we are using sectors with the size of 19 00:01:56,199 --> 00:02:03,400 512 bytes. Now, let me use N to create a new partition. And there we have the choice between 20 00:02:03,400 --> 00:02:09,639 primary or extended. Remember, in MBR, you can only address four partitions. But as this 21 00:02:09,639 --> 00:02:15,059 is the first one, I'm going to start with a primary partition, partition number one. 22 00:02:15,059 --> 00:02:20,580 The first sector starts at 2048. In case you are wondering, why doesn't it start at the 23 00:02:20,580 --> 00:02:27,500 beginning? Well, there's a simple explanation. Every disk, the first megabyte is reserved 24 00:02:27,500 --> 00:02:34,259 for metadata storage, administrative information about what you are doing on your disk. So 25 00:02:34,320 --> 00:02:40,160 your first partition will always start at MB number one. Then it's asking for the size. 26 00:02:40,160 --> 00:02:47,800 In the last sector, well, I'm going for the plus size in KMGT or P. So I'm using plus 27 00:02:47,800 --> 00:02:55,320 one uppercase G. Don't forget, Linux is case-sensitive. Lowercase G is really not going to work. And 28 00:02:55,320 --> 00:03:00,160 now we can see that the new partition one of type Linux and a size of one gigabyte has 29 00:03:00,160 --> 00:03:06,100 been set. It's a good idea to verify that using P for print partition table. And here 30 00:03:06,100 --> 00:03:12,940 we can see that the device NVMe 0 and 1P1 has been added. If that is what you wanted, 31 00:03:12,940 --> 00:03:20,660 use W to write, and then use LSB OK to verify that the new partition is visible. And as 32 00:03:20,660 --> 00:03:27,380 you can see, it is visible. So mission accomplished. We still need to create a file system on top 33 00:03:27,380 --> 00:03:33,199 of it. I'm showing you how to work with file systems in one of the upcoming videos.