Last Update: Jul 5, 2024

Today’s sponsor is Depot. Depot is a remote container build service that’s half the cost of GitHub Actions runners and up to 40x faster than other build services. Try it for free.


So you just got a fancy new Raspberry Pi and want to set it up and get it running. There are several ways to do this, and there are many instructions for folks using Windows, Mac, or Ubuntu.

“How to install the Raspberry PI OS in Arch Linux”

Lately, I’ve been using the RPI Imager. There aren’t any instructions on the official website for Arch Linux, but it isn’t much different to install and adds some cool options, as we’ll see in this article. I’ll also show you the old “dd” method.

So grab your SD card, and let’s get started.

Verifying your SD Card

I have a brand new SD card for this project, but that doesn’t matter much. I’ve plugged it into my laptop, and now let’s verify it exists and that it’s working. Arch Linux usually mounts these to /dev/sda. You can search to see how/where it’s mounted by typing in

sudo fdisk -l 

This will show you a nice list.

“How to install the Raspberry PI OS in Arch Linux”

You can also type

lsblk

To show your mounted drives as well. Again, it appears to be /dev/sda1.

“How to install the Raspberry PI OS in Arch Linux”

If you want, you can format /dev/sda1

sudo umount /dev/sda*

and use mkfs to format the card. If you want to format it for Windows, you can also use

sudo mkfs.fat -F 32 /dev/sda1

And this will create a new FAT32 partition:

“How to install the Raspberry PI OS in Arch Linux”

This is all optional, I’m starting with a blank card, so it doesn’t matter much. Let’s put an OS on this thing.

Installing from an Image

If you check out this page, you will see quite a few options for installing an OS on the Raspberry Pi. There are many more images out there, including Arch Linux for your Raspberry Pi!

The one I am interested in is Raspberry PI OS Lite:

“How to install the Raspberry PI OS in Arch Linux”

  • Raspberry Pi OS Lite
  • Release date: July 4th 2024
  • System: 64-bit
  • Kernel version: 6.6
  • Debian version: 12 (bookworm)
  • Size: 432MB

I’ll click that download it, and now I have this .xz image in my downloads.

“How to install the Raspberry PI OS in Arch Linux”

We need to convert 2024-07-04-raspios-bookworm-arm64-lite.img.xz into an image.

Let’s install some xz utils:

sudo pacman -S xz

Then, extract it:

unxz 2024-07-04-raspios-bookworm-arm64-lite.img.xz

And you should now see an img file:

“How to install the Raspberry PI OS in Arch Linux”

Next, we’ll use dd to copy the raw image onto our SD Card:

sudo dd if=2024-07-04-raspios-bookworm-arm64-lite.img of=/dev/sda bs=4M conv=fsync status=progress

“How to install the Raspberry PI OS in Arch Linux”

And it’s good to go!

“How to install the Raspberry PI OS in Arch Linux”

Pop out the card and put it in your Raspberry Pi.

If you prefer a graphical interface, that’s available too. Let’s try it out!

Easier way with the RPI Imager

Not everyone is fond of the command line, even Arch Linux users. However, we also have the RPI Imager available in Arch.

sudo pacman -S rpi-imager 

It’s just a single command, giving you the same imager you find on Ubuntu, Windows, and Mac.

“How to install the Raspberry PI OS in Arch Linux”

First, you choose your device. In my case, it’s a Raspberry Pi 5:

“How to install the Raspberry PI OS in Arch Linux”

Then under images, select Raspberry Pi OS (other)

“How to install the Raspberry PI OS in Arch Linux”

From there we can select Raspberry Pi OS Lite:

“How to install the Raspberry PI OS in Arch Linux”

And finally, choose our storage:

“How to install the Raspberry PI OS in Arch Linux”

and select the SD Card:

“How to install the Raspberry PI OS in Arch Linux”

And it’s ready to burn.

Here is where it gets awesome.

“How to install the Raspberry PI OS in Arch Linux”

You can edit your OS settings, set a username and password, and set your Wi-Fi settings.

“How to install the Raspberry PI OS in Arch Linux”

This is great because, without a monitor on your Raspberry Pi, you have to connect to your network with an ethernet cable, hunt down your IP address, log in with the default login, and set up your Wifi.

Make sure to enable SSH so you can get into the Pi:

“How to install the Raspberry PI OS in Arch Linux”

With this window using the RPI Imager, you can set your Wifi up and configure it to connect before you even boot the first time. It’s a great addition.

“How to install the Raspberry PI OS in Arch Linux”

Now you can pop in your card, power up your Pi and you’re ready to go!

“How to install the Raspberry PI OS in Arch Linux”

Summary

In this tutorial, we showed two different ways to install an OS for your Raspberry Pi using an Arch Linux Desktop.

While I’ve done the dd/command line images for years, I’ve come to appreciate the RPI Imager because of the customization step at the end. You can go in and make changes to the filesystem on your SD card after it’s written, but this is so easy and simple. It’s the way I’ve been doing it for a while now.

I hope this has helped you out, and If you have any questions or comments feel free to reach out.


Today’s sponsor is Depot. Depot is a remote container build service that’s half the cost of GitHub Actions runners and up to 40x faster than other build services. Try it for free.



Published: Jul 4, 2024 by Jeremy Morgan. Contact me before republishing this content.