1 00:00:06,900 --> 00:00:07,733 - In this video 2 00:00:07,733 --> 00:00:10,293 I'll show you how to create MBR partitions. 3 00:00:11,520 --> 00:00:13,140 Before creating any partitions 4 00:00:13,140 --> 00:00:15,360 I'm going to use LSBLK. 5 00:00:15,360 --> 00:00:17,680 LSBLK is for list block device 6 00:00:18,750 --> 00:00:21,600 where we can see that I currently have an SDA, 7 00:00:21,600 --> 00:00:24,690 and on that I have SDA1 and SDA2. 8 00:00:24,690 --> 00:00:27,660 I also have SDB, SDC, and SDD. 9 00:00:27,660 --> 00:00:30,423 And for this demo I'm going to use SDB. 10 00:00:31,320 --> 00:00:35,463 To create MBR I'm going to use the good old F disk utility. 11 00:00:36,690 --> 00:00:40,260 And this utility requires the name of the device 12 00:00:40,260 --> 00:00:42,990 on which you want to create the partitions. 13 00:00:42,990 --> 00:00:45,360 F disk is not the only partitioning utility 14 00:00:45,360 --> 00:00:46,530 that you can use. 15 00:00:46,530 --> 00:00:48,270 You could also use partlet, 16 00:00:48,270 --> 00:00:50,610 but I don't like partlet very much 17 00:00:50,610 --> 00:00:52,620 because it's hiding the advanced features, 18 00:00:52,620 --> 00:00:54,600 and F disk is just more powerful. 19 00:00:54,600 --> 00:00:56,343 So that's why I'm using F disk. 20 00:00:57,660 --> 00:00:59,310 Now we get some message, 21 00:00:59,310 --> 00:01:00,667 and this message is telling me, 22 00:01:00,667 --> 00:01:03,450 "Oh, we don't have a recognized partition table," 23 00:01:03,450 --> 00:01:06,930 and created a new DOS disk label. 24 00:01:06,930 --> 00:01:10,323 DOS disk label, that's an MBR disk label. 25 00:01:11,250 --> 00:01:13,950 So we can use P to figure out what is going on. 26 00:01:13,950 --> 00:01:15,450 And while using P 27 00:01:15,450 --> 00:01:18,210 we see some generic information about the disk. 28 00:01:18,210 --> 00:01:20,703 We don't see any partitions yet. 29 00:01:21,930 --> 00:01:25,320 If I want to get help, I need to press the M key. 30 00:01:25,320 --> 00:01:27,540 And after pressing the M key 31 00:01:27,540 --> 00:01:29,640 I see what is more like a menu. 32 00:01:29,640 --> 00:01:32,010 That's probably what the M is coming from. 33 00:01:32,010 --> 00:01:34,800 And I can decide what I want to do. 34 00:01:34,800 --> 00:01:38,400 Well, generic, I want to add a new partition. 35 00:01:38,400 --> 00:01:41,460 So let me use N to create a new partition. 36 00:01:41,460 --> 00:01:43,650 And then it is prompting me what do I want to do? 37 00:01:43,650 --> 00:01:46,650 It's telling me I can choose between primary and extended. 38 00:01:46,650 --> 00:01:48,780 And there are four primaries free. 39 00:01:48,780 --> 00:01:50,850 You should always use all of your primaries 40 00:01:50,850 --> 00:01:54,180 before starting to use extended and logical partitions 41 00:01:54,180 --> 00:01:56,460 because primaries are easier to troubleshoot 42 00:01:56,460 --> 00:01:58,053 in case anything goes wrong. 43 00:01:59,100 --> 00:02:01,980 So I'm pressing P, partition number, 44 00:02:01,980 --> 00:02:03,780 well partition number one. 45 00:02:03,780 --> 00:02:04,890 And the first sector, 46 00:02:04,890 --> 00:02:07,473 I'm pressing enter to accept the default first sector. 47 00:02:07,473 --> 00:02:09,810 And then it asks for the last sector, 48 00:02:09,810 --> 00:02:12,450 which can also be specified as a size. 49 00:02:12,450 --> 00:02:17,223 I'm using plus 2G to create a two gigabytes partition here. 50 00:02:18,210 --> 00:02:19,043 And there we go. 51 00:02:19,043 --> 00:02:21,480 Create a new partition, one of type Linux 52 00:02:21,480 --> 00:02:23,400 and size two gigabytes. 53 00:02:23,400 --> 00:02:26,469 Using P again, we can see this new partition. 54 00:02:26,469 --> 00:02:27,900 Now that was easy. 55 00:02:27,900 --> 00:02:30,510 I'm going to create two more primary partitions. 56 00:02:30,510 --> 00:02:32,130 And then I want to show you how to work 57 00:02:32,130 --> 00:02:34,050 with an extended partition. 58 00:02:34,050 --> 00:02:37,140 So I do this real fast, partition number two, first sector. 59 00:02:37,140 --> 00:02:38,520 I accept the default. 60 00:02:38,520 --> 00:02:41,133 I make this one gigabytes, 61 00:02:42,540 --> 00:02:46,200 and likewise, partition number three, primary again. 62 00:02:46,200 --> 00:02:49,650 Number three, default first sector plus 1G 63 00:02:49,650 --> 00:02:51,780 to make it one gigabytes. 64 00:02:51,780 --> 00:02:53,670 And now I'm pressing N again. 65 00:02:53,670 --> 00:02:55,650 And what is happening? 66 00:02:55,650 --> 00:02:57,210 Well, you can see that the utility 67 00:02:57,210 --> 00:03:00,539 is defaulting to E for extended. 68 00:03:00,539 --> 00:03:03,390 That is because I'm creating my fourth partition. 69 00:03:03,390 --> 00:03:04,980 And in a master book records 70 00:03:04,980 --> 00:03:07,950 you can create a maximum of four partitions. 71 00:03:07,950 --> 00:03:10,530 So I'm accepting the default for extended. 72 00:03:10,530 --> 00:03:12,573 And if you create an extended, 73 00:03:13,462 --> 00:03:16,022 then you should allocate all of the remaining disk space 74 00:03:16,022 --> 00:03:17,883 to the extended partition. 75 00:03:18,780 --> 00:03:20,550 Logical partitions are created 76 00:03:20,550 --> 00:03:22,470 within the extended partition. 77 00:03:22,470 --> 00:03:24,810 And if you don't allocate all of your disk space 78 00:03:24,810 --> 00:03:28,800 at this moment, you cannot do anything with it later on. 79 00:03:28,800 --> 00:03:30,720 So I'm pressing enter and enter 80 00:03:30,720 --> 00:03:32,790 to use all of the remaining disk space, 81 00:03:32,790 --> 00:03:35,793 which creates six gigabytes extended partition. 82 00:03:37,380 --> 00:03:40,380 B will show me SDB4, 83 00:03:40,380 --> 00:03:43,110 which is ID five type is extended. 84 00:03:43,110 --> 00:03:44,670 That's what I needed. 85 00:03:44,670 --> 00:03:46,690 Now if I use N 86 00:03:47,670 --> 00:03:48,503 then it's telling me 87 00:03:48,503 --> 00:03:50,520 all primary partitions are in use, 88 00:03:50,520 --> 00:03:53,100 and it is going to create a logical partition. 89 00:03:53,100 --> 00:03:55,950 I want to have two logical partitions. 90 00:03:55,950 --> 00:03:58,020 So partition number five is the first one. 91 00:03:58,020 --> 00:04:00,480 I want it to be one gigabyte. 92 00:04:00,480 --> 00:04:04,650 And partition number six will be the second one. 93 00:04:04,650 --> 00:04:07,503 I also want it to be one gigabyte. 94 00:04:08,550 --> 00:04:09,720 Now I'm using P again. 95 00:04:09,720 --> 00:04:10,950 And what do we see? 96 00:04:10,950 --> 00:04:12,635 We see that the extended partition 97 00:04:12,635 --> 00:04:16,020 has this range of sectors, 98 00:04:16,020 --> 00:04:19,230 and if you look at the range of sectors for SDB5, 99 00:04:19,230 --> 00:04:21,810 then you can see it falls within the range of sectors 100 00:04:21,810 --> 00:04:26,220 for the extended partition and likewise for SDB6. 101 00:04:26,220 --> 00:04:30,180 So logical partitions are a part of the extended partition, 102 00:04:30,180 --> 00:04:32,670 and that's what I need you to realize. 103 00:04:32,670 --> 00:04:33,690 Once we are done, 104 00:04:33,690 --> 00:04:38,670 use W to write and then everything is good. 105 00:04:38,670 --> 00:04:41,430 You can use LSBLK to verify, 106 00:04:41,430 --> 00:04:43,470 or if you want to do it a fancy way, 107 00:04:43,470 --> 00:04:46,710 you can also use cat on the file slash proc 108 00:04:46,710 --> 00:04:48,390 slash partitions. 109 00:04:48,390 --> 00:04:51,600 That's the kernel interface file in the proc file system 110 00:04:51,600 --> 00:04:53,430 where you can see that these partitions 111 00:04:53,430 --> 00:04:55,350 really have been created. 112 00:04:55,350 --> 00:04:58,080 And that's how you work with MBR partitions. 113 00:04:58,080 --> 00:05:00,420 Now the next thing will be to create a file system 114 00:05:00,420 --> 00:05:01,770 on top of it. 115 00:05:01,770 --> 00:05:04,020 That's what you will learn in the next lesson. 116 00:05:04,020 --> 00:05:05,250 First, we are going to explore 117 00:05:05,250 --> 00:05:07,353 how to work with GPT partitions.