Learn how to install Arch Linux on your Raspberry Pi 3 in this step-by-step guide

Follow along as we walk you through the process of installing Arch Linux on your Raspberry Pi 3, a popular and powerful single board computer. This article will cover all the necessary steps for setti …


Updated September 5, 2023

Need help with your Raspberry Pi?
Contact Me!

Do you love silly Raspberry Pi Projects?
Check out my this YouTube Channel!


Follow along as we walk you through the process of installing Arch Linux on your Raspberry Pi 3, a popular and powerful single board computer. This article will cover all the necessary steps for setting up Arch Linux on your Raspberry Pi 3 with ease.

Installing Arch Linux on Raspberry Pi 3: A Step-by-Step Guide

Arch Linux is a lightweight and flexible Linux distribution that provides you with a powerful set of tools to customize your system according to your needs. In this guide, we will walk you through the process of installing Arch Linux on your Raspberry Pi 3. This guide assumes that you have basic knowledge of Linux and are comfortable using the command line interface.

Step 1: Download Arch Linux Image for Raspberry Pi

The first step is to download the latest version of Arch Linux for Raspberry Pi from the official website. You can find the image here. Make sure you choose the correct image for your Raspberry Pi model and hardware revision.

Step 2: Write the Image to an SD Card

You will need to write the downloaded image onto an SD card using a tool like Etcher. Follow the instructions on their website to write the image to your SD card.

Step 3: Boot Your Raspberry Pi

Insert the SD card into your Raspberry Pi and connect it to a power source, a display, and a keyboard. Once the system has booted up, you should see the Arch Linux console.

Step 4: Connect to the Internet

Before proceeding with the installation, make sure your Raspberry Pi is connected to the internet. You can check this by running ping -c 3 archlinux.org. If it returns a response, you are good to go.

Step 5: Update System Clock and Timezone

To ensure that your system clock and timezone settings are correct, run the following commands:

timedatectl set-ntp true
timedatectl set-timezone <your_timezone>

Replace <your_timezone> with your desired timezone, for example, America/New_York.

Step 6: Partition the SD Card

Arch Linux uses a custom partition scheme that is not compatible with the default Raspberry Pi setup. We need to create partitions manually using the fdisk command. Run the following commands to create the necessary partitions:

fdisk /dev/mmcblk0
  • Press n to create a new partition and follow the prompts to create a 512M EFI partition, a swap partition, and a root partition.
  • Set the EFI partition type to ef00 and the root partition type to 83000.
  • Write the changes to disk by pressing w and exiting fdisk.

Step 7: Format the Partitions

Now we need to format the partitions using the following commands:

mkfs.vfat /dev/mmcblk0p1
mkswap /dev/mmcblk0p2
mkfs.ext4 /dev/mmcblk0p3

Step 8: Mount the Partitions

Next, we need to mount the partitions using the following commands:

mount /dev/mmcblk0p3 /mnt
mkdir -p /mnt/boot/EFI
mount /dev/mmcblk0p1 /mnt/boot/EFI
swapon /dev/mmcblk0p2

Step 9: Install Arch Linux

Now we are ready to install Arch Linux. Run the following command to start the installation process:

pacstrap /mnt base base linux linux-firmware vim openssh sudo

This will install the basic packages required for a functional system. If you need additional packages, you can add them to this list.

Step 10: Generate fstab

We need to create a fstab file that tells the system how to mount partitions on boot. Run the following command:

genfstab -U /mnt >> /mnt/etc/fstab

Step 11: Chroot into the New System

Before we can configure our new Arch Linux installation, we need to chroot into it using the following command:

arch-chroot /mnt /bin/bash

Step 12: Configure the System

Now that we are inside the new system, we need to set some basic configuration. Run the following commands:

echo "<your_hostname>" > /etc/hostname
echo "127.0.0.1	localhost" >> /etc/hosts
echo "::1		localhost" >> /etc/hosts
echo "127.0.1.1	<your_hostname>.localdomain <your_hostname>" >> /etc/hosts
ln -sf /usr/share/zoneinfo/<your_timezone> /etc/localtime
hwclock --systohc

Replace <your_hostname> with a name for your Raspberry Pi.

Step 13: Set Root Password

Set the root password using the following command:

passwd

Step 14: Install Bootloader

We need to install the bootloader so that our system can boot properly. Run the following commands:

pacman -S grub efibootmgr
grub-install --target=arm64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

Step 15: Exit Chroot and Reboot

Exit the chroot environment by typing exit and reboot your Raspberry Pi:

umount -R /mnt
reboot

Once your Raspberry Pi has rebooted, you should see the Arch Linux login prompt.

Congratulations! You have successfully installed Arch Linux on your Raspberry Pi 3. From here, you can customize and configure your system to your heart’s content.