- Follow installation instructions here: https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4
- Format SD card
fdisk /dev/sdX- Type
o. This will clear out any partitions on the drive. - Type
pto list partitions. There should be no partitions left. - Type
n, thenpfor primary,1for the first partition on the drive, press ENTER to accept the default first sector, then type+200Mfor the last sector. - Type
t, thencto set the first partition to typeW95 FAT32 (LBA). - Type
n, thenpfor primary,2for the second partition on the drive, and then press ENTER twice to accept the default first and last sector. - Write the partition table and exit by typing
w.
- Type
- Create and mount 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 and extract the root filesystem (as root, not via sudo):
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz bsdtar -xpf ArchLinuxARM-rpi-armv7-latest.tar.gz -C root sync - Move boot files to the first partition:
mv root/boot/* boot - Run this to correctly setup boot from sd card
sed -i 's/mmcblk0/mmcblk1/g' root/etc/fstab - Unmount the two partitions:
umount boot root
- Format SD card
- Unplug the SD card and plug it into your raspberry pi and boot it up.
- You can now connect through
sshusing useralarmand passwordalarm. Root password isroot - Initialize the pacman keyring and populate the Arch Linux ARM package signing keys:
pacman-key --init pacman-key --populate archlinuxarm - Follow chapter 3 "Configure the system" here: Arch Linux Instructions starting from "Time zone"
- Repeat steps above for the attached USB SSD directly from the Raspberry PI
- Replace boot device in fstab:
sed -i 's/mmcblk0p/sda/g' root/etc/fstab - Run these commands:
umount /mnt/boot
mount /dev/sda1 /mnt/root/boot
arch-chroot /mnt/root
pacman -Syu
vi /etc/mkinitcpio.conf
# modify mkinitcpio.conf so MODULES=(pcie_brcmstb) to enbale boot from USB device
mkinitcpio -P
exit
poweroff
- remove micro sd card and reboot (should now boot from USB SSD)
- Install necessary software:
pacman -Sy vim git sudo - Setup your personal user with password
useradd -m <username>, change the root password to something more secure and delete the existing useruserdel alarm -f - Adjust
/etc/sudoersto whitelist your personal user - Close ssh session and login with your new personal user
- Clone and install the dotfiles:
mkdir packagescd packagesgit clone https://github.com/RononDex/dotfilescd dotfilesbash ./profile-enabler.sh- Select the AstroPi profile