sodcalculator

10 Tech How-To

Install Arch Linux on Raspberry Pi: Step-by-Step

Guide 10-33991 · Updated · Step by step

Yes, you can install Arch Linux on a Raspberry Pi, and the process is straightforward if you follow the official ARM instructions. You will download an Arch Linux ARM tarball, partition an SD card, extract the root filesystem, and then boot your Pi. This guide walks through the entire procedure for a Raspberry Pi 4 or 5, including common pitfalls and post-install setup.

What Arch Linux ARM Is

Arch Linux ARM (ALARM) is a port of Arch Linux for ARM processors, including the Broadcom chips used in Raspberry Pi boards. It follows the same rolling-release model as the x86_64 version, meaning you get continuous updates rather than fixed releases. Unlike Raspberry Pi OS, which is based on Debian, Arch gives you a minimal base system that you build up yourself—no desktop environment, no preinstalled tools, just a bare command line. This appeals to users who want full control, the latest software, and a deep understanding of their system.

The project is community-maintained and provides tarballs for each supported Pi model. The Raspberry Pi 4 and 5 are officially supported, as are older models like the Pi 3 and Pi Zero 2 W. You should always check the official ALARM website for the latest image names and any model-specific notes before starting.

What You Need Before Starting

Gather the following items before you begin:

  • A Raspberry Pi 4 or 5 (or another supported model) and a compatible power supply.
  • A microSD card (at least 8 GB, but 16 GB or larger is recommended) and a card reader for your computer.
  • A computer running Linux, macOS, or Windows with internet access.
  • An Ethernet cable or a configured Wi-Fi dongle (though setting up Wi-Fi from the command line is possible).
  • A keyboard and monitor for the first boot, or a serial console cable if you prefer headless setup.

Make sure you back up any data on the SD card because the installation will completely erase it. Also, note that some USB card readers or SD cards have quirks; using a known-good card and reader reduces frustration.

Step-by-Step Installation

Follow these steps carefully. The exact commands may vary slightly depending on your host operating system and the version of the tarball.

  1. Download the tarball. Go to the Arch Linux ARM website, navigate to the Raspberry Pi section, and download the latest tarball (e.g., ArchLinuxARM-rpi-aarch64-latest.tar.gz for 64-bit Pi 4/5). Verify the SHA-256 checksum if provided.
  2. Partition the SD card. Insert the SD card into your computer. Use fdisk (Linux), diskutil (macOS), or a tool like Rufus (Windows) to create two partitions on the card. The first partition should be about 256 MB, type W95 FAT32 (LBA), and the second partition should use the remaining space, type Linux. Mark the first partition as bootable.
  3. Format the partitions. Format the first partition as FAT32: mkfs.vfat /dev/sdX1. Format the second partition as ext4: mkfs.ext4 /dev/sdX2. Replace sdX with your actual device name (e.g., mmcblk0 on some systems).
  4. Mount the partitions. Create mount points and mount both partitions. For example: mkdir -p /mnt/boot /mnt/root, then mount /dev/sdX1 /mnt/boot and mount /dev/sdX2 /mnt/root.
  5. Extract the tarball. As root, run: bsdtar -xpf ArchLinuxARM-rpi-aarch64-latest.tar.gz -C /mnt/root. This extracts the root filesystem. Then, move the boot files to the boot partition: mv /mnt/root/boot/* /mnt/boot.
  6. Unmount and insert. Unmount both partitions (umount /mnt/boot /mnt/root), safely remove the SD card, and insert it into the Raspberry Pi.
  7. Power on and log in. Connect the Pi to a monitor and keyboard, then power it on. After a short boot, you should see a login prompt. The default root password is root, and the default user is alarm with password alarm. Log in as root and change the password immediately with passwd.

Post-Installation Setup

Once you have logged in, you need to initialize the pacman keyring and update the system. Run the following commands as root:

pacman-key --init
pacman-key --populate archlinuxarm
pacman -Syu

This updates the package database and upgrades all packages. After that, you can install additional software with pacman -S. For example, to install a desktop environment, you might install xorg and xfce4. To enable Wi-Fi, use iwctl (from the iwd package) or configure wpa_supplicant. You should also create a regular user account with useradd -m -G wheel username and set a password.

Common Problems and How to Fix Them

Many issues arise from simple mistakes during partitioning or extraction. Here are the most frequent ones:

  • Boot failure or kernel panic: This often means the boot partition is not formatted correctly or the tarball was not extracted properly. Re-check that the first partition is FAT32 and bootable, and that you moved the boot files correctly.
  • No HDMI output: Some Pi models require a config.txt setting for certain displays. Check the official ALARM documentation for your specific model. For Pi 4, you may need to set hdmi_safe=1 in config.txt.
  • Wi-Fi not working: The default install does not include a network manager. Use iwctl to connect to a network, or install networkmanager and enable it with systemctl enable --now NetworkManager.
  • Package keyring errors: If you get errors about unknown keys during pacman -Syu, re-run the keyring initialization commands. This is a common issue after a fresh install.
  • SD card corruption: Always unmount the card cleanly before removing it. If you experience corruption, reformat and redo the installation.

Arch vs. Raspberry Pi OS: Which to Choose?

Arch Linux ARM and Raspberry Pi OS serve different purposes. Raspberry Pi OS is based on Debian and is designed to be beginner-friendly, with a graphical installer, preconfigured desktop, and a large repository of educational software. It is stable and well-tested for the Pi hardware. Arch Linux ARM, on the other hand, is a minimal, rolling-release distribution that gives you the latest software but requires more manual configuration. It is ideal for users who want to learn Linux internals, build custom systems, or prefer the Arch philosophy of simplicity and user control.

If you are new to Linux or just want a working system quickly, Raspberry Pi OS is the safer choice. If you are comfortable with the command line and enjoy tweaking your system, Arch offers a rewarding experience. Also, note that Arch Linux ARM is not officially supported by the Raspberry Pi Foundation; it is maintained by the Arch Linux ARM community.

Frequently Asked Questions

Can I install Arch on a Raspberry Pi 5?

Yes, the Raspberry Pi 5 is supported by Arch Linux ARM. The installation process is the same as for the Pi 4, but you must download the appropriate tarball (usually named ArchLinuxARM-rpi-aarch64-latest.tar.gz). Ensure your Pi 5 has the latest firmware, and be aware that some early Pi 5 models had boot issues that were resolved with firmware updates.

Do I need a 64-bit OS?

For Raspberry Pi 4 and 5, the 64-bit (aarch64) version is recommended because it supports more memory and faster performance. The 32-bit (armv7) version is available for older models like the Pi 2 and Pi 3. Using the 32-bit OS on a 64-bit capable Pi limits you to 4 GB of RAM and may have fewer available packages.

How do I set up Wi-Fi from the command line?

After booting, use iwctl (from the iwd package, which is often preinstalled). Start it with iwctl, then run device list to find your wireless device, station wlan0 scan, station wlan0 get-networks, and station wlan0 connect SSID. Enter the password when prompted. To make it persistent, use systemctl enable --now iwd and consider installing networkmanager for easier management.

Is Arch Linux ARM stable enough for daily use?

It can be, but because it is a rolling release, updates can occasionally introduce bugs or break configurations. Many users run it as a server or for hobby projects without issues. If you need guaranteed stability for production, consider a fixed-release distribution like Raspberry Pi OS or Debian. Always keep backups and be prepared to troubleshoot after major updates.

Can I dual-boot Arch and Raspberry Pi OS?

Yes, you can have multiple operating systems on different SD cards, but dual-booting on the same card is not straightforward because the Pi’s bootloader expects a single boot partition. The simplest method is to swap SD cards, or use a tool like PINN (a multi-boot manager) that can install multiple OSes on one card. However, this is not officially supported by Arch Linux ARM.

What is the default root password?

The default root password is root, and the default user is alarm with password alarm. You should change both immediately after your first login using the passwd command. Leaving default credentials makes your system vulnerable to unauthorized access.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →