Arch Guide

02. Partitioning your drive (UEFI)

Starting gdisk

gdisk is the disk partitioning tool we will use for GPT partition tables.

Start it like this: gdisk /dev/[DISK] (e.g. fdisk /dev/sda)

Creating a new partition table

Note: If you don't want to overwrite all of the data on your drive, resize your existing partitions to make space for new partitions and skip this step.

Enter o and press enter to create a new table (and y to confirm).

Creating a boot partition

This partition will contain your kernel, initramfs and possibly a boot loader. It needs to have a special format (we'll use FAT32 later) so your BIOS can read it, as it's the part the BIOS loads at first. We're making this its own partition so we can use a better file system (like EXT4) for the rest of the data.

Run n to start the creation of a new partition.

Partition number: Press enter to use the first available partition number (should be 1 if your drive is empty).

First sector: Press enter to place the partition as far to the start as possible.

Last sector: Enter +512M to make the partition 512MB in size (it adds the size of 512MB to the first sector, that's why there's a +). 512MB should be adequate for this purpose.

Hex code: Enter EF00 to make it an EFI partition (so your BIOS can recognize it as bootable).

Creating a data/root partition

This partition will contain everything else and can use any supported file system (we'll use EXT4 later).

Run n again and use the default values for partition number and first sector.

For the last sector, use the default value (just press enter) to make the partition use the entire rest of the disk, or enter something like +64G to make the partition 64GB in size (this will leave some space for other partitions, in case you need that).

For the Hex code, use the default value.

Saving and exiting gdisk

Enter w to write the changes to the drive (and y to confirm). This will also exit gdisk.

The output should look like this:
OK; writing new GUID partition table (GPT) to /dev/sda.
The operation has completed successfully.

If you made a mistake, you can discard the changes and exit using q instead.

Next: Installing the basics