Arch Partition Guide

  1. Start fdisk on your target disk (replace X with the appropriate letter):
sudo fdisk /dev/sdX
  1. Create a new GPT partition table (for UEFI systems):
Command (m for help): g
  1. 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
  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
  1. 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]
  1. 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
  1. Print the partition table to verify:
Command (m for help): p
  1. Write changes and exit:
Command (m for help): w
  1. Format the partitions:
sudo mkfs.fat -F32 /dev/sdX1  # EFI partition
sudo mkswap /dev/sdX2         # Swap partition
sudo mkfs.ext4 /dev/sdX3      # Root partition
  1. Mount the partitions:
sudo mount /dev/sdX3 /mnt
sudo mkdir /mnt/boot
sudo mount /dev/sdX1 /mnt/boot
sudo swapon /dev/sdX2