Skip to content

$ cat ./posts/arch/installing-arch-without-archinstall.md

-rw-r--r-- 1.6K #arch #pacman

Installing Arch without archinstall

by chris · 1 min read · /arch


The guided installer is fine. It is also a black box, and the first time something breaks you will be reading the wiki page you skipped. The manual install is not hard — it is a partition table, a filesystem, a chroot and a bootloader.

1. Disk and filesystem

sgdisk --clear 
  --new=1:0:+1G   --typecode=1:ef00 
  --new=2:0:0     --typecode=2:8300 /dev/nvme0n1

mkfs.fat -F32 /dev/nvme0n1p1
mkfs.ext4 /dev/nvme0n1p2
mount /dev/nvme0n1p2 /mnt
mount --mkdir /dev/nvme0n1p1 /mnt/boot

2. Base system

pacstrap -K /mnt base linux linux-firmware sudo vim
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt

genfstab -U writes UUIDs rather than device paths. Skip the -U and the first time a disk enumerates differently the machine will not boot.

3. Inside the chroot

ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
hwclock --systohc
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen
locale-gen
echo 'workstation' > /etc/hostname
passwd
bootctl install

Then a loader entry, which is four lines and the part people get wrong:

# /boot/loader/entries/arch.conf
title   Arch Linux
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
options root=UUID=... rw

4. Before you reboot

Install and enable networking inside the chroot. Rebooting into a system with no dhcpcd, no iwd and no way to fetch either is the classic first-install mistake, and it costs a second pass with the USB stick.

← cd .. fris@linux:~/blog$ man arch