How to Partition Disks for Arch Linux

Learn how to partition disks for Arch Linux, a minimalist Linux distribution.

Arch Linux is a powerful, minimalist Linux distribution designed for users who want to build their system from the ground up. One of the first and most critical steps in installing Arch Linux is disk partitioning. While this may seem intimidating to newcomers, it’s a valuable skill that enhances your understanding of how Linux systems manage data. This article will walk you through the partitioning process in detail, with practical guidance for different use cases.


Why Partition Disks?

Partitioning a disk involves dividing the physical storage device into separate, logically independent sections. Each partition can be formatted with a different filesystem and mounted at various locations in the Linux directory structure.

The primary reasons to partition a disk include:

  • Separation of system and user data for easier management and backup
  • Multi-boot configurations (e.g., dual booting with Windows)
  • Improved system recovery by isolating critical data
  • Performance tuning for specific workloads (e.g., using separate disks for /home or swap)

Tools Used for Partitioning

When installing Arch Linux, you typically boot into a live ISO environment. From there, you can use one of several tools to partition your disk:

  • fdisk: Best for MBR partitioning.
  • gdisk: A GPT-compatible version of fdisk.
  • cfdisk: A text-based, user-friendly UI for both MBR and GPT.
  • parted: More advanced tool, supports scripting and resizing.

In this guide, we’ll focus on using cfdisk and parted for clarity and ease of use.


Step 1: Boot into the Arch ISO

Start by downloading the latest Arch Linux ISO from the official site and boot it via USB or virtual machine.

Once booted, open a terminal. You’re now in the Arch live environment, ready to begin partitioning.


Step 2: Identify the Target Disk

First, identify which disk you want to partition. Run:

lsblk

This command lists block devices and their current partition layouts. For example:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   512G  0 disk
sdb      8:16   0   256G  0 disk

Suppose you’re installing Arch on /dev/sda.

⚠️ Warning: All data on the disk will be lost after partitioning. Make sure you back up anything important.


Step 3: Choose Partitioning Scheme – MBR vs GPT

You need to choose between two partitioning schemes:

  • MBR (Master Boot Record): Older, supports up to 4 primary partitions. Ideal for legacy BIOS systems.
  • GPT (GUID Partition Table): Modern, supports up to 128 partitions and larger disks. Required for UEFI boot.

To determine your boot mode, run:

ls /sys/firmware/efi/efivars

If the directory exists, you’re booted in UEFI mode. Use GPT. If not, you’re in BIOS mode and can use MBR or GPT.


Step 4: Partition the Disk with cfdisk or parted

Option A: Using cfdisk

Launch cfdisk with your disk:

cfdisk /dev/sda

You will be prompted to choose a label type:

  • Select gpt if using UEFI
  • Select dos if using BIOS

Create the following partitions (a common and flexible layout):

Mount PointSizeTypeDescription
/boot/efi512 MBEFI SystemRequired for UEFI systems
/20–50 GBLinux FilesystemRoot filesystem
/homeRemainingLinux FilesystemUser data
[SWAP]1–2x RAMLinux SwapOptional but useful for laptops

Use the New and Type options in cfdisk to create each partition.

Once done, write the table and quit.

Option B: Using parted

For more control or scripting, parted is ideal:

parted /dev/sda --script mklabel gpt
parted /dev/sda --script mkpart ESP fat32 1MiB 513MiB
parted /dev/sda --script set 1 esp on
parted /dev/sda --script mkpart primary ext4 513MiB 20.5GiB
parted /dev/sda --script mkpart primary ext4 20.5GiB 100%

You can adapt the sizes as needed. This script creates an EFI system partition, a root partition, and a home partition.


Step 5: Format the Partitions

Next, format the partitions with the appropriate filesystems:

For UEFI systems

mkfs.fat -F32 /dev/sda1            # EFI partition
mkfs.ext4 /dev/sda2                # Root partition
mkfs.ext4 /dev/sda3                # Home partition
mkswap /dev/sda4                   # Swap (if created)
swapon /dev/sda4

For BIOS systems (no EFI)

mkfs.ext4 /dev/sda1                # Root
mkfs.ext4 /dev/sda2                # Home
mkswap /dev/sda3
swapon /dev/sda3

Step 6: Mount the Filesystems

Mount the root partition:

mount /dev/sda2 /mnt

Create and mount other directories:

mkdir /mnt/boot
mkdir /mnt/boot/efi
mkdir /mnt/home

mount /dev/sda1 /mnt/boot/efi
mount /dev/sda3 /mnt/home

If using BIOS and no separate EFI partition:

mkdir /mnt/home
mount /dev/sda2 /mnt/home

Optional Layouts for Advanced Users

Depending on your needs, here are a few common advanced partitioning strategies:

1. Separate /var Partition

Useful for servers or systems with lots of package and log activity:

/        – 20 GB  
/home    – 100 GB  
/var     – 10–20 GB  
swap     – 1–2x RAM

2. LVM Setup

Logical Volume Management allows dynamic resizing of partitions:

# Create a physical volume
pvcreate /dev/sda2

# Create a volume group
vgcreate arch-vg /dev/sda2

# Create logical volumes
lvcreate -L 25G arch-vg -n root
lvcreate -L 8G arch-vg -n swap
lvcreate -l 100%FREE arch-vg -n home

Then format and mount the LVs accordingly.


Step 7: Proceed with Arch Installation

Once your partitions are set up and mounted, continue with the official Arch installation process:

pacstrap /mnt base linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt

You can now proceed to configure timezone, locale, hostname, users, bootloader, etc.


Best Practices for Disk Partitioning

  • Always back up data before modifying disk partitions.
  • Label your partitions using e2label, tune2fs, or parted to avoid confusion.
  • Encrypt sensitive partitions using LUKS if you’re on a laptop or shared system.
  • Use separate partitions for /home to simplify system reinstalls.
  • Consider Btrfs or ZFS for snapshotting and advanced features (only recommended for advanced users).

Final Thoughts

Partitioning your disk for Arch Linux is not just a setup step—it’s a foundational decision that affects performance, security, and flexibility. Whether you choose a simple root-and-home layout or go all-in with LVM and encryption, understanding your storage structure is vital.

By carefully planning and executing your partitioning scheme, you lay the groundwork for a stable and personalized Arch system. If you’re new to this, don’t worry. Every great Arch user was once a beginner, staring at an empty disk, ready to learn.