Flashing SD card with Arch Linux ARM for Raspberry Pi 2 and 3

Prereqs

Preparing SD card

Start fdisk to partition the SD card:

fdisk /dev/sdX

Create and mount the FAT filesystem:

mkfs.vfat /dev/sdX1
mkdir boot
mount /dev/sdX1 boot

Create and mount the ext4 filesystem:

mkfs.ext4 /dev/sdX2
mkdir root 
mount /dev/sdX2 root

Download archive

curl -LO http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-3-latest.tar.gz

Extract the root filesystem (as root, not via sudo)

bsdtar -xpf ArchLinuxARM-<rpi-version>-latest.tar.gz -C root
sync

Move boot files to the first partition:

mv root/boot/* boot

Unmount the two partitions:

umount boot root

Installing

Refer to the Arch Linux Installation Guide for detailed information.

Connect the Pi to the local network and do an arp-scan to find its IP address

# arp-scan -l --interface=enp3s0

SSH to it and login with alarm:alarm

$ ssh alarm@$PI_ADDRESS

Change password immediately

alarm@alarm$ passwd

Use su to get root and change root password. Default root password is root

alarm@alarm$ su
root@alarm# passwd

References