Partitioning
First, basic partitioning divides the disk space into two parts: / (root) and a partition for swap. The partition for swap must be prepared.
1.Using gdisk commands
When gdisk is invoked, the following is displayed.
gdisk always requires a device file name as an argument
![](https://korodes.com/wp-content/uploads/2023/09/3581e4e9c50f438eba6326d04686ea15.jpg)
The device name is /dev/nvme0n1 if you are using an M.2 SSD, or /dev/sda if you are using an old device SSD.
In this case, enter the following for SSD use
![](https://korodes.com/wp-content/uploads/2023/09/89d9ec63005c1f46fb0a3923afedf77e.jpg)
To confirm that you have specified the correct device file, enter p. If it is an SSD, you will see the following output
![](https://korodes.com/wp-content/uploads/2023/09/2c0591cd5a9c8923b4e7bc8c69081799.jpg)
2.Create partition table
Create a partition table for the GUID.
This area will store the partition information you are about to create.
Type o, then Enter
Type Y to delete all partitions and create a new protective MBR
![](https://korodes.com/wp-content/uploads/2023/09/be322d23ba0bd484ad2fb8d858f8f738.jpg)
3.EFI System Partition Creation
Create EFI system partition with 100MB
![](https://korodes.com/wp-content/uploads/2023/09/8c8be6df40c19a87f902396b464075c8.jpg)
4.Create partition for swap
Create 1GB as swap space
![](https://korodes.com/wp-content/uploads/2023/09/cf1be6a265c5835079b33d2a22de8930.jpg)
5.Create partition for /(root)
This time, create all remaining space as a partition for the root
![](https://korodes.com/wp-content/uploads/2023/09/a972911df7391823fe30d73bfd661614.jpg)
6.Checking and writing the created partitions
Confirm the partition you created by entering p
![](https://korodes.com/wp-content/uploads/2023/09/d273bf93ec566f296ed1cd4e613b6996.jpg)
Enter "w" to write the partition table to disk and exit gdisk
![](https://korodes.com/wp-content/uploads/2023/09/fb9627ade43a222be76f786615cf01f0.jpg)