Arch Linux ARM Installation on a Raspberry Pi 3B+

This guide is based on the Arch Linux ARM v7 installation guide, but is extended to configure the Wi-Fi network on the Raspberry Pi:

  1. Connect the microSD card to a Linux computer.

  2. Run lsblk and identify the microSD card.

    Replace sdX in the following instructions with the device name for the microSD card as it appears on your computer.

  3. Start fdisk to partition the SD card:

    fdisk /dev/sdX
  4. At the fdisk prompt, delete old partitions and create a new one:

    1. Type o. This will clear out any partitions on the drive.

    2. Type p to list partitions. There should be no partitions left.

    3. Type n, then p for primary, 1 for the first partition on the drive, press ENTER to accept the default first sector, then type +200M for the last sector.

    4. Type t, then c to set the first partition to type W95 FAT32 (LBA).

    5. Type n, then p for primary, 2 for the second partition on the drive, and then press ENTER twice to accept the default first and last sector.

    6. Write the partition table and exit by typing w.

  5. Create and mount the FAT filesystem:

    mkfs.vfat /dev/sdX1
    mkdir boot
    mount /dev/sdX1 boot
  6. Create and mount the ext4 filesystem:

    mkfs.ext4 /dev/sdX2
    mkdir root
    mount /dev/sdX2 root
  7. Download the latest ARMv7 OS tarball:

    wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-armv7-latest.tar.gz
  8. Extract the files to the root partition as root:

    sudo bsdtar -xpf ArchLinuxARM-rpi-armv7-latest.tar.gz -C root
  9. Sync changes:

    sync
  10. Move boot files to the first partition:

    mv root/boot/* boot
  11. Create the WiFi configuration file in the mounted root filesystem:
    sudo nvim root/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
  12. Add your network details (replace placeholders), save and exit:
    country=AU  # Your country code
    ctrl_interface=/run/wpa_supplicant
    update_config=1
    network={
        ssid="your_ssid"
        psk="your_passphrase"
    }
  13. Enable the necessary systemd services offline using the --root flag (run from the host computer):

    sudo systemctl --root=root/ enable wpa_supplicant@wlan0.service
    sudo systemctl --root=root/ enable dhcpcd@wlan0.service

    This creates symbolic links in root/etc/systemd/system/multi-user.target.wants/ to activate services on boot.

  14. Unmount, insert the SD card, and boot the Raspberry Pi. It should connect to WiFi automatically if the configuration is correct. Proceed with an Arch Linux installation as normal.