This guide will show you how to install and run Arch Linux ARM on your Rasbperry Pi 4 and Raspberry Pi 3b+
Install Arch Linux ARM from a Windows machine
For Windows users, you will need to format the card using external software. However, I recommend downloading Etcher and then running GParted-live off a live USB. Use Ethcer to burn Gparted live ISO to a USB.
Then follow the rest of the tutorial 😉
Install Arch Linux ARM from a Linux machine
Insert your SD card and identify which disk it is using lsblk, or either gparted or gnome-disks
lsblk -d -o name,model,size
# UBUNTU sudo apt install gparted gnome-disks # CENTOS sudo yum install gparted gnome-disks # ARCH sudo pacman -S gparted gnome-disks
I highly recommend a graphical disk editor because unless you are using the native SD card slot, your SD can sometimes show up as a sdX disk instead of a mmcblkX disk.
My disk is called /dev/sdf, BUT I am using a
It’s really a samsung UHS SD card, but I am using a SD card reader. Yours might be /dev/mmcblk1
How to Partition Disks for Arch Linux ARM
- Delete all partitions on SD card
- Create 100mMB FAT16 partition
- Create 63GB ext4 partition
Hint: must be msdos/MBR partition table, done automatically in gnome-disks
sudo fdisk /dev/sdX # type the following letters during the prompts o n p 1 <press enter> +100M y t c n p 2 <press enter> <press enter> w
# create fat16 and ext4 in the two new partitions sudo mkfs.vfat /dev/sdX1 sudo mkfs.ext4 /dev/sdX2
Copy Arch Linux ARM Filesystem to SD Card
Arch Linux for ARM is nicely prepared as a targz. All you need to do is:
- extract the .tar.gz (AS ROOT, NOT JUST SUDO)
- move all files to the ext4 partition
- move /boot/* to the fat16 partition
Mount and open a terminal inside the 64GB partition
# do this inside the SD card directory! # download the right image for your device: # be root sudo su # Raspberry Pi 3b+ wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz # Raspberry Pi 4 wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-4-latest.tar.gz # sudo extract into the drive. Must use sudo tar -xzvf ArchLinuxARM-rpi-2-latest.tar.gz -C . # sync drives sync # move the contents of the folder boot to the actual boot partition. mv ./boot/* /run/media/user/BC60-D5C5/
You may see “Failed to preserve ownership” errors.
That’s normal because the boot partition isn’t owned by anyone..
One last step… Enable SSH (if you want)
Open the big partition folder at ./etc/ssh/sshd_config
# Uncomment or add these two lines to the bottom of /etc/ssh/sshd_config inside the SD card PasswordAuthentication yes PermitRootLogin yes
You’re Ready to Boot!
If you have a USB keyboard, you can connect to wifi
Otherwise, you will need Ethernet to use internet in the beginning.
- User: root
- Password: root
- User: alarm
- Password: alarm
# find your IP address by looking at your router's network page # or the ethernet port number you are using # or just try ssh to [email protected], 3, 4, 5, 6... etc. until you find it [[email protected] ~]$ ssh [email protected] Warning: Permanently added '192.168.1.3' (ECDSA) to the list of known hosts. root192.168.1.3's password: Welcome to Arch Linux ARM Website: http://archlinuxarm.org Forum: http://archlinuxarm.org/forum IRC: #archlinux-arm on irc.Freenode.net [[email protected] ~]$
Once you’ve SSH’ed in you’re done! That’s Arch 🙂
You’d probably want a desktop in Arch Linux.
Install xfce4 onto Arch Linux ARM
# login as root OR login as alarm and type su # install sudo pacman-key --init pacman-key --populate archlinuxarm pacman -Syu pacman -S sudo echo 'alarm ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers # exit root back to alarm user exit # enter home cd # update to latest arch, rolling reserve sudo pacman -Syu # install base development tools sudo pacman -S base-devel binutils git fakeroot make automake autoconf # install xfce4, X11, and video drivers for the x server frame buffer sudo pacman -S xfce4 xfce4-goodies xorg-server xf86-video-fbdev xorg-xinit # optional install the world famous Arch User Repository! git clone https://aur.archlinux.org/yay.git cd yay makepkg -si # from the terminal run startxfce4 # or # dbus-launch startxfce4 # or # nohup startxfce4 &