X
    Categories: Guides

Installing Arch Linux on Raspberry Pi

This is a how-to guild on Installing Arch Linux on Raspberry Pi. There are many OS that will work with raspberry pi, and I believe Arch Linux is to be one of the most versatile and also complicated to install. this guild should be able to walk you step by step through that grueling process.

Equipment List

Raspberry Pi 3 ► Amazon | Ebay

1. Prepare SD Card and install

on linux PC:

$ lsblk
$ sudo fdisk /dev/sdX

clear partitions on the drive (o)

create first partition (n, p, 1, enter, +100M, t, c)

create second partition (n, p, 2, enter, enter), then write and exit (w)

when you are done with fdisk, follow the commands to format the partitions

$ sudo mkfs.vfat /dev/sdX1
$ sudo mkfs.ext4 /dev/sdX2

make folder to mount partitions

$ mkdir /mnt/boot/
$ mkdir /mnt/root/
$ sudo mount /dev/sdx1 /mnt/boot/
$ sudo mount /dev/sdx2 /mnt/root/

download and install arch

$ wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
$ sudo su
$ tar zxvf /location/of/file/ArchLinuxARM-rpi-2-latest.tar.gz -C /mnt/rootmv /mnt/root/boot/* /mnt/boot

synchronize disk to ensure everything was copied

$ sync

2. Init Process

On Raspberry Pi:

login: root
password: root

setting up wifi with wpa_supplicant

sudo nano /etc/wpa_supplicant/home_wifi

add following and edit ssid and psk with your old network info

network={
ssid="neworkname"
psk="password"
}

initiating pacman, upgrading arch and install sudo

$ pacman-key --init
$ pacman -Syupacman -S 
$ sudo screen
$ nano /etc/sudoers.d/myOverrides

add following

alarm ALL=NOPASSWD: ALL

switch to user alarm:

su alarm

3. Install Desktop

install packer for additional software down the road

sudo pacman -S packer

now lets install the desktop

sudo pacman -S xorg-server xf86-video-fbdev xorg-xrefresh

leave everything as default

XFCE4:

sudo pacman -S xfce4 xfce4-goodies

now we need desktop manager:

sudo pacman -S sddm

we are going to load default configs with this command

sudo sh -c "sddm --example-config > /etc/sddm.conf"

autologin:

sudo nano /etc/sddm.conf

search and modify:

[autologin]  Session=xfce.desktop  User=alarm

custom theme i’m using

packer -S arc-gtk-theme

custom fonts

packer -S ttf-roboto

SDDM autostart:

sudo systemctl enable sddm sudo systemctl start sddm

4. Network Manager

lets install a network manager so you can control your wifi or ethernet via gui

sudo pacman -Syu networkmanager network-manager-applet sudo systemctl enable NetworkManager sudo systemctl start NetworkManager

reboot

5. Bluetooth

lets install the tools we need to compile bluetooth

sudo pacman -S make gcc git-core automake autoconf pkg-config libtool patch packer -S yaourt blueman yaourt -S pi-bluetooth sudo systemctl start bluetooth.service sudo systemctl enable bluetooth.service sudo systemctl enable brcm43438.service sudo pacman -Syu pulseaudio-alsa pulseaudio-bluetooth pavucontrol bluez bluez-libs bluez-utils bluez-firmware
novaspirit: Avid Thinker, Computer Programmer, Web evangelist, Hacking / Breaking expert, Problem Solver, Technology Obsessed, Gamer, 3D printing, Coffee lover!

View Comments (6)

  • very interesting, thanks.

    can I recommend that the next video is on gentoo on RPi? since it's also a custom ruling distro I feel that it fits nicely in this trend you have started with different linux distros on Raspberry Pi.

    all the best.

  • Cool! Thanks for all the hard work in putting this up. I had a few little minor issues. It's when I was trying to create the SD card, after the last step on fdisk where you write to the disk, you need to reboot. And there are a few things with mounting the boot and root files because it already mounted it for me. Anyway! Got the desktop running and installing things! Thanks novaspirit!

    • hi Robby. i have some problems with unmounting boot and root folders. when i try to unmount them they unmount with no issues but when i run arch linux it crashes and says "sdb1 was not probably ummounted" i also tried to use fsck command and it dosn't work. can you help me with that

  • Nice, but it needs some modifications:
    Firstly, current sddm version (April 2019) is not compatible with RPi.
    Secondly, packer is obsolete and other substitutions should be used (I'd prefer trizen and yay)

Related Post