Family Encyclopedia >> Electronics

Step-by-Step Guide: Installing Arch Linux ARM on Raspberry Pi

As a long-time Linux enthusiast and Raspberry Pi tinkerer, I've installed Arch Linux ARM on multiple Pis for projects ranging from servers to media centers. This lightweight, highly customizable distro offers unmatched flexibility on ARM hardware. Follow this proven, hands-on guide to get it running smoothly on your Raspberry Pi.

Prerequisites

Before starting, gather these essentials:

  • Raspberry Pi
  • MicroSD card (8GB or larger)
  • Arch Linux ARM image for Raspberry Pi (download from the official site)
  • Stable internet connection
  • A computer that can read SD cards (this tutorial uses Linux)

Prepare the SD Card

First, identify your SD card among connected drives:

sudo fdisk -l
Step-by-Step Guide: Installing Arch Linux ARM on Raspberry Pi

Launch fdisk on your SD card device (e.g., /dev/sdb—double-check to avoid data loss):

sudo fdisk /dev/sdb

Erase existing partitions by typing o and pressing Enter.

Step-by-Step Guide: Installing Arch Linux ARM on Raspberry Pi

Verify with p. No partitions should remain.

Step-by-Step Guide: Installing Arch Linux ARM on Raspberry Pi

Create the boot partition: n, p, 1, Enter (defaults), then +100M for size.

Step-by-Step Guide: Installing Arch Linux ARM on Raspberry PiStep-by-Step Guide: Installing Arch Linux ARM on Raspberry Pi

Set type to W95 FAT32 (LBA): t, c.

Step-by-Step Guide: Installing Arch Linux ARM on Raspberry Pi

Create root partition: n, p, 2, Enter twice for defaults.

Step-by-Step Guide: Installing Arch Linux ARM on Raspberry PiStep-by-Step Guide: Installing Arch Linux ARM on Raspberry Pi

Write changes and exit: w.

List partitions again:

sudo fdisk -l
Step-by-Step Guide: Installing Arch Linux ARM on Raspberry Pi

Copy Arch Linux Files to SD Card

Format and mount partitions (replace /dev/sdbX with yours):

sudo mkfs.vfat -F32 /dev/sdb1
sudo mkdir boot
sudo mount /dev/sdb1 boot
sudo mkfs.ext4 /dev/sdb2
sudo mkdir root
sudo mount /dev/sdb2 root
Step-by-Step Guide: Installing Arch Linux ARM on Raspberry Pi

Download the Arch Linux ARM tarball to your home directory, then extract:

sudo bsdtar -xpf ArchLinuxARM-rpi-2-latest.tar.gz -C root/
sync

Move boot files:

sudo mv root/boot/* boot/

Unmount:

sudo umount boot root

Eject the SD card and insert it into your Raspberry Pi.

Initial Configuration on Raspberry Pi

Power on the Pi and connect Ethernet or Wi-Fi. Log in as root (password: root). For Wi-Fi:

wifi-menu

Select your network. Initialize pacman keys:

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

Update packages:

pacman -Syu

Create and rename user (replace 'newusername'):

usermod -l newusername root
passwd newusername
usermod -d /home/newusername -m newusername

Change root password:

passwd

Install sudo:

pacman -S sudo

Edit sudoers:

EDITOR=nano visudo

Add newusername ALL=(ALL) ALL below the root line. Save and exit.

Congratulations! Your Arch Linux on Raspberry Pi is ready. Use it for Minecraft servers, NAS, Plex, or endless custom projects.