What command would you use to create an ext4 filesystem?
Below the instructions to create a new ext4 partition on a new hard drive with 5 (tested on Ubuntu 14.04.4 LTS x64). 5 supports GUID Partition Table (GPT) and subsequently can be used for partitions above 2TB, unlike 8. Show Use 9 to see the logical name of your new hard drive:
The logical name is 0. We can get started:
With 1, we can see the GPT got created:
We also need to know the size of the disk (we will use MB as the unit):
which indicates:
We can now create the primary partition so that it takes the entire hard drive space. To set the partition label:
(see https://unix.stackexchange.com/a/49274/16704 if you want to know why we use 2)With 1, we can see the primary partition label got created:
We then need to use mkfs to actually create the partition:
The partition is now created, we need to mount it. To do so, 4 and add the following line ( 5 is the folder in which we choose to mount the new partition):
We create the folder and reload 6:
You can see the new mounted partition using 7: 0In 4, instead of using 9 you could use its 0, which you can find with 1: 1Otherwise you could simply do 2: 2The new line 6 will be: 3https://unix.stackexchange.com/a/137868/16704 explains why it's best to use UUID (liquidat, cc by-sa 3.0):
|