Arch Partition Guide
- Start fdisk on your target disk (replace X with the appropriate letter):
- Create a new GPT partition table (for UEFI systems):
- Create EFI System Partition (ESP):
Command (m for help): n
Partition number: 1
First sector: [Press Enter for default]
Last sector: +1G
Command (m for help): t
Partition type or alias: 1
- Create swap partition (optional, size depends on your RAM):
Command (m for help): n
Partition number: 2
First sector: [Press Enter for default]
Last sector: +4G # Adjust size as needed
Command (m for help): t
Partition number: 2
Partition type or alias: 19
- Create root partition:
Command (m for help): n
Partition number: 3
First sector: [Press Enter for default]
Last sector: [Press Enter to use remaining space]
- Set partition types (if not already set):
Command (m for help): t
Partition number: 1
Partition type or alias: 1 # EFI System
Command (m for help): t
Partition number: 2
Partition type or alias: 19 # Linux swap
Command (m for help): t
Partition number: 3
Partition type or alias: 20 # Linux filesystem
- Print the partition table to verify:
- Write changes and exit:
- Format the partitions:
sudo mkfs.fat -F32 /dev/sdX1 # EFI partition
sudo mkswap /dev/sdX2 # Swap partition
sudo mkfs.ext4 /dev/sdX3 # Root partition
- Mount the partitions:
sudo mount /dev/sdX3 /mnt
sudo mkdir /mnt/boot
sudo mount /dev/sdX1 /mnt/boot
sudo swapon /dev/sdX2