You are here: Home / Hardware / Raspberry Arch install

Raspberry Arch install

For the Pi3 the base instructions are on https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3.

The zero-w has has the same main processor (BCM2835) as the original pi-a and pi-b. So Single core arm v6. But it by default runs at 1Ghz (+300Mhz vs the older pis). The original pi instructions are still valid, see https://archlinuxarm.org/platforms/armv6/raspberry-pi

  • partition sdcard

  • format, mount

  • download image and unpack

SD-Card

i use different filesystems so the setup is:

parted /dev/sdc mklabel msdos
parted -a optimal /dev/sdc mkpart primary fat32 1 100
parted -a optimal /dev/sdc mkpart primary ext2 100 100%

mkfs.vfat -n PI_BOOT /dev/sdc1
mkfs.f2fs -l PI_ROOT /dev/sdc2

Now mount the partitions, download the image for pi3 or zero-w and extract:

curl -L -O http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-latest.tar.gz
bsdtar -C /run/media/user/PI_ROOT -xvf ArchLinuxARM-rpi-latest.tar.gz
mv /run/media/user/PI_ROOT/boot/* /run/media/user/PI_BOOT/
sync

Serial Console

The pi3 and the zero-w have a bluetooth chipset. This leads to problems using the Raspberry Serial Console.

The pi has two serial devices a hardware based full featured one (ttyAMA0) and a software based miniuart. The pi foundation decided that a stable connection for the bluetooth module is more important then a serial console. So by default it used the ttyAMA0 for the connection to the bluetooth chips.

Luckily this can be changed /run/media/user/PI_BOOT/config.txt:

# no graphics in use
gpu_mem=16
initramfs initramfs-linux.img followkernel

# use the hardware (ttyAMA0) uart for the serial console on pin 8/10
# bluetooth will be on the software (miniuart)
dtoverlay=miniuart-bt

user setup

enable root login via ssh. Login to the pi as user alarm (password alarm). Become root (su -, default password root). Edit /etc/ssh/sshd_config to include PermitRootLogin yes. Restart sshd (systemctl restart sshd.service)

Verfiy root login works.

Rename default user alarm to a useful account.

groupmod \
  --new-name me
  alarm
usermod \
  --move-home \
  --login me \
  --home /home/me \
  alarm

wifi

note requires at least raspberrypi-firmware 20160305.

Using systemd to setup the wifi connections not NetworkManager.

wpa_supplicant will associate with the wifi network. Establishing the layer2 connection. Systemd will then start dhcp to get an ip address (layer3).

prepare ssid

wpa_passphrase SSID PSK > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

prepare systemd by creating /etc/systemd/network/wlan0.network:

[Match]
Name=wlan0

[Network]
DHCP=yes
# enable and start wpa
systemctl enable wpa_supplicant@wlan0
systemctl start wpa_supplicant@wlan0
# check that layer2 works
iw wlan0 info
iwconfig wlan0
# check that we can manually get an ip
dhcpcd -B wlan0
# reload networkd, so it will pickup the changes
systemctl restart systemd-networkd.service