1 00:00:00,000 --> 00:00:11,160 In this video, you'll learn how to create GPT partitions with ParThet. 2 00:00:11,160 --> 00:00:15,520 Now let me mention one thing, ParThet is not the only utility. 3 00:00:15,520 --> 00:00:21,459 You can also use fdisk and create a GPT partition, or use the gdisk utility instead. 4 00:00:21,459 --> 00:00:26,320 And depending on where you come from, you might find that a little bit more intuitive. 5 00:00:26,320 --> 00:00:30,100 As in ParThet, you need to use options that are a bit surprising. 6 00:00:30,100 --> 00:00:32,080 So how are you going to use ParThet? 7 00:00:32,080 --> 00:00:34,119 You need to open the ParThet shell. 8 00:00:34,119 --> 00:00:38,639 So ParThet dev sdb will open the ParThet shell on your sdb device. 9 00:00:38,639 --> 00:00:44,320 And access commands that allow you to work with it, like print, which will show the current 10 00:00:44,320 --> 00:00:45,720 partition type. 11 00:00:45,720 --> 00:00:52,560 MK label allows you to set either GPT or MBR, which is the MS-DOS partition label. 12 00:00:52,560 --> 00:00:58,480 MK part, which will prompt for the partition name, file system type, and start and end. 13 00:00:58,480 --> 00:01:03,400 This prompt for the file system type is rather confusing because it won't create a file system 14 00:01:03,400 --> 00:01:04,400 for you. 15 00:01:04,400 --> 00:01:07,599 It will just mark the partition in the appropriate way. 16 00:01:07,599 --> 00:01:11,320 Next, you can use print to verify what you've done so far. 17 00:01:11,320 --> 00:01:16,639 And assuming that you are happy, you can use quit to exit ParThet and update the partition 18 00:01:16,639 --> 00:01:18,040 table. 19 00:01:18,040 --> 00:01:22,080 Let me show you how to do this on an example disk. 20 00:01:22,080 --> 00:01:28,720 So once again, I'm starting with LSBLK, which is showing that my free device is NVMe 0 and 2. 21 00:01:28,720 --> 00:01:29,720 Good. 22 00:01:29,720 --> 00:01:35,720 So I'm using ParThet on dev NVMe 0 and 2. 23 00:01:35,720 --> 00:01:38,680 And there we can see the ParThet interface. 24 00:01:38,680 --> 00:01:44,559 At any time, you can use help for help about the commands that are available that can be 25 00:01:44,559 --> 00:01:48,360 useful if you get lost on this interface. 26 00:01:48,360 --> 00:01:52,040 Now I'm going to start with the print command. 27 00:01:52,040 --> 00:01:55,639 And the print command is giving me partition table unknown. 28 00:01:55,639 --> 00:01:58,199 Now that's a serious, serious situation. 29 00:01:58,199 --> 00:02:01,760 And that is why I need MK label GPT. 30 00:02:01,760 --> 00:02:05,559 And now we have the partition label set to GPT. 31 00:02:05,559 --> 00:02:12,000 Then I can use MK part primary, which is surprising, but it's a requirement in ParThet. 32 00:02:12,039 --> 00:02:20,399 I mean, GPT doesn't have the notion of primary and secondary and standard and logical partitions. 33 00:02:20,399 --> 00:02:22,880 GPT just has partitions. 34 00:02:22,880 --> 00:02:29,800 But ParThet, due to its compatibility with MBR, needs you to specify primary. 35 00:02:29,800 --> 00:02:32,800 Then I need to specify the use of the partition. 36 00:02:32,800 --> 00:02:35,119 And in this case, it will be ext4. 37 00:02:35,119 --> 00:02:40,080 That is also surprising because it doesn't do anything with that information. 38 00:02:40,119 --> 00:02:42,720 It doesn't add an ext4 file system. 39 00:02:42,720 --> 00:02:46,479 You still need to add the file system separately. 40 00:02:46,479 --> 00:02:47,880 0%. 41 00:02:47,880 --> 00:02:52,279 That's how I indicate that the partition should start at the beginning of my disk. 42 00:02:52,279 --> 00:02:56,759 And one gigabyte is the size of the partition. 43 00:02:56,759 --> 00:02:58,399 And now I'm going to repeat that. 44 00:02:58,399 --> 00:03:02,440 And I'm using MK part primary once more. 45 00:03:02,440 --> 00:03:04,919 And this time I'm using Linux swap. 46 00:03:04,919 --> 00:03:06,720 Linux swap is a partition type. 47 00:03:06,720 --> 00:03:08,399 We will talk about it later. 48 00:03:08,399 --> 00:03:11,639 And here you can set the partition type directly. 49 00:03:11,639 --> 00:03:14,000 Then I need to indicate where it should start. 50 00:03:14,000 --> 00:03:16,399 Well, it should start at one gigabyte. 51 00:03:16,399 --> 00:03:19,080 And it should end at six gigabyte. 52 00:03:19,080 --> 00:03:21,160 And that is doing it. 53 00:03:21,160 --> 00:03:22,679 Hey, we are working in the blind. 54 00:03:22,679 --> 00:03:24,320 I don't like this very much. 55 00:03:24,320 --> 00:03:30,759 So please use print so that you can verify what is going on and what it has done so far. 56 00:03:30,759 --> 00:03:32,440 And this is looking good. 57 00:03:32,440 --> 00:03:37,119 So I am going to use quit to write all of it. 58 00:03:37,119 --> 00:03:40,240 And that's telling me you may need to update ETCFS app. 59 00:03:40,240 --> 00:03:46,000 No, because I still need to use MKFS to create my file systems. 60 00:03:46,000 --> 00:03:47,839 Now, I want to show you a command. 61 00:03:47,839 --> 00:03:51,000 And this command is UDEF ADM settle. 62 00:03:51,000 --> 00:03:57,479 UDEF ADM settle is what the Parthet guys are recommending to update systemd UDEF 63 00:03:57,479 --> 00:04:01,240 and make sure that the devices are created throughout. 64 00:04:01,240 --> 00:04:05,279 On modern Linux, you won't need to do that very often anymore. 65 00:04:05,279 --> 00:04:08,240 But you are preparing for an exam. 66 00:04:08,240 --> 00:04:12,399 And in the exam, this might come in handy to know about it. 67 00:04:12,399 --> 00:04:14,479 And here you can see what is going on. 68 00:04:14,479 --> 00:04:15,759 And what has it done? 69 00:04:15,759 --> 00:04:20,239 Well, it has created two partitions, the P1 and the P2. 70 00:04:20,239 --> 00:04:24,920 And kind of funny, I asked it to create a one gigabyte partition. 71 00:04:24,920 --> 00:04:25,679 It did not. 72 00:04:25,679 --> 00:04:29,760 It created a 1,023 megabyte partition. 73 00:04:29,760 --> 00:04:35,679 And that is one of the reasons that I'm not sure that Parthet is the best utility. 74 00:04:35,679 --> 00:04:37,279 You know what I'm going to do? 75 00:04:37,279 --> 00:04:40,079 I'm going to show you how to do the same with FDisk. 76 00:04:40,079 --> 00:04:44,559 So FDisk on dev NVMe 0 and 2. 77 00:04:44,559 --> 00:04:46,559 Using P to print. 78 00:04:46,559 --> 00:04:50,200 And here we can see the partitions that have been created so far. 79 00:04:50,200 --> 00:04:52,399 Using M for the menu. 80 00:04:52,399 --> 00:04:58,320 Now, in FDisk, it's important to know that FDisk is an MBR-oriented utility. 81 00:04:58,320 --> 00:05:05,079 So if you want to create GPT, you really must use G to create a new empty GPT partition table 82 00:05:05,079 --> 00:05:07,480 before you do anything else. 83 00:05:07,480 --> 00:05:10,880 Now I'm going to use N to create a new partition. 84 00:05:10,880 --> 00:05:13,239 And I like it that FDisk is telling me something. 85 00:05:13,239 --> 00:05:16,480 Hey, it's suggesting me to create a default partition 3. 86 00:05:16,480 --> 00:05:19,279 And I can go up to 128. 87 00:05:19,279 --> 00:05:23,559 And then first sector, yeah, well, I'm just going to enter what it proposes. 88 00:05:23,600 --> 00:05:29,959 And last sector, I'm going to make that plus 1G for one gigabyte. 89 00:05:29,959 --> 00:05:34,320 And there we can see new partition 3 of type Linux file system. 90 00:05:34,320 --> 00:05:35,600 I'm using P. 91 00:05:35,600 --> 00:05:41,720 And there we can see that my very first partition that I created in Parthet is the type Linux file system. 92 00:05:41,720 --> 00:05:43,359 Oh, that is this one. 93 00:05:43,359 --> 00:05:47,160 And the FDisk partition is the type Linux file system as well. 94 00:05:47,160 --> 00:05:52,359 The funny thing is when in Parthet I specified I want an EXT4 partition, 95 00:05:52,359 --> 00:05:54,799 it doesn't do anything with EXT4. 96 00:05:54,799 --> 00:05:58,519 It just sets the partition type as Linux file system. 97 00:05:58,519 --> 00:06:00,359 And that is what it is doing. 98 00:06:00,359 --> 00:06:03,920 And here you can see that FDisk has done what I asked it to do. 99 00:06:03,920 --> 00:06:06,359 It created the one gigabyte partition. 100 00:06:06,359 --> 00:06:07,959 And that's what I wanted, right? 101 00:06:07,959 --> 00:06:09,480 So I'm happy with it. 102 00:06:09,480 --> 00:06:11,720 And I'm going to use W to write. 103 00:06:11,720 --> 00:06:15,880 And in case you are wondering, doesn't it hurt to use two different utilities? 104 00:06:15,880 --> 00:06:17,119 No, not at all. 105 00:06:17,119 --> 00:06:21,720 Because they are just two different ways to write information to your disk. 106 00:06:21,720 --> 00:06:23,160 And it just works. 107 00:06:23,160 --> 00:06:26,880 And that is what we confirm when we use LSBLK. 108 00:06:26,880 --> 00:06:31,440 There you go, three partitions on NVMe 0 and 2.