Skip to content

Instantly share code, notes, and snippets.

@chris-79
Last active June 8, 2018 11:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris-79/d74ac5d142bf5e232eaf2747bf78cdf0 to your computer and use it in GitHub Desktop.
Save chris-79/d74ac5d142bf5e232eaf2747bf78cdf0 to your computer and use it in GitHub Desktop.
Installing Arch Linux on Raspberry Pi

1. Prepare SD Card and install

on linux PC:

lsblk
sudo fdisk /dev/sd**X**

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

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 -Syu
pacman -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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment