Arch Linux on Raspberry Pi

Introduction: Arch Linux on Raspberry Pi

About: Avid Thinker, Computer Programmer, Web evangelist, Hacking / Breaking expert, Problem Solver, Technology Obsessed, Gamer, 3D printing, Coffee lover!

On this tutorial I will be showing you how I would install Arch Linux on my raspberry Pi. Since there are many different approaches to what could be configured there is no right or wrong way to install this. Thanks

Step 1: Prepare the SD Card and Install Arch Linux

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)

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/root 
mv /mnt/root/boot/* /mnt/boot 
sync

Step 2: Init

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 -Syu
pacman -S sudo screen
nano /etc/sudoers.d/myOverrides

add following

alarm ALL=NOPASSWD: ALL

switch to user alarm:

su alarm

Step 3: Installing 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

Step 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

Step 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

Be the First to Share

    Recommendations

    • Make it Glow Contest

      Make it Glow Contest
    • First Time Author Contest

      First Time Author Contest
    • PCB Challenge

      PCB Challenge

    11 Discussions

    0
    hondaafricantwin
    hondaafricantwin

    5 days ago

    After this i got stuck,

    we are going to load default configs with this command
    sudo sh -c “sddm –example-config > /etc/sddm.conf”

    I see a empty sddm.conf" in /etc/ directory

    For a noob this is very annoying


    0
    Torxed
    Torxed

    6 days ago

    It's `sddm --example-config | sudo tee /etc/sddm.conf` and not `-example-config`, but it's better to get users used to tee instead of rogue sh lines :)

    0
    trevorbrookes
    trevorbrookes

    3 months ago

    is it me or ? but I'm a complet noob, so sorry if I'm wrong

    mv /mnt/root/boot/* /mnt/boot
    This gives me an error and am stuck here

    also I had to sudo to get these two to work
    mkdir /mnt/boot/
    mkdir /mnt/root/

    0
    freefox
    freefox

    9 months ago

    Actually a nice guide and it would be even nicer if systemD would never come to existence.
    Yeah thats one thing the the double -- dashes did not get properly registered on the side and when you copy them back to the terminal they become single - and break things but man the amount of trouble systemD gave me just made me chose another distro.

    So here is what happens after install:

    1, wireless will not connect out of the box even after you set the supplicant you will need to run wpa_supplicant ...

    2, Even after you connect you will not get an IP you will need to run dhclient wlan0

    Now this is where potterD gonna mess with you: you will notice that the DNS is not working hmmm why? it is because systemd does not care about /etc/resolv.conf it has hardcoded DNS servers such as 1.1.1.1 which is some DNS server from australia... anyway still the DNS servers are online so they should work so what is going on?

    What is going on is that DNS sec is enabled by default and it relies on computer time but your time is way off thanks to systemd and NTP is not installed.

    This was the point where I got fed up.

    0
    andyc2302
    andyc2302

    Question 11 months ago on Step 5

    im not able to boot to GUI

    0
    andyc2302
    andyc2302

    11 months ago

    Hi Can anyone advise me, i setup the arch linux arm for raspberry pi 4 but somehow it does not goes to the GUI screen or how shall i go about it dun seems to work for me

    0
    viroxon
    viroxon

    1 year ago on Step 3

    This step broke the installation. Going by your instructions.

    0
    viroxon
    viroxon

    1 year ago on Step 2

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

    Notice the extra step necessary and that you put a single - instead of --

    This would have stopped anyone else right there as soon as they tried. And without populating the keys you'd never be able to update.

    0
    tobyas987
    tobyas987

    1 year ago

    It did not for me using an usb stick. Maybe gottta try the sd card they delivered with it.
    For me it booted but didn't load shit, so it got me into a emergency shell of no return
    .

    0
    hendergassler
    hendergassler

    1 year ago

    Here is a typo, i guess it should be
    custom theme
    pacmac -S arc-gtk-theme

    custom fonts

    pacman -S ttf-roboto