Setup

Connect

iwctl
device list
station <device> scan
station <device> get-networks
station <device connect <SSID>
ping google.com

Date and Time

timedatectl set-ntp true
timedatectl status

Set timezone

ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime

Sync the hardware clock

date
hwclock --systohc

Disk

Format the disk with gdisk, creating 2 partitions:

  • p1: 1GB / EFI
  • p2: Rest / Linux Crypt

Formatting

Create the EFI Fs

mkfs.fat -F 32 -n EFI /dev/nvme0n1p1

Crypt

cryptsetup luksFormat /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 arch
lsblk

Btrfs

mkfs.btrfs /dev/mapper/arch
mount /dev/mapper/arch /mnt
ls /mnt
btrfs  subvolume create /mnt/@
btrfs  subvolume create /mnt/@home
btrfs  subvolume create /mnt/@var
btrfs  subvolume create /mnt/@swap
btrfs  subvolume create /mnt/@pacman
btrfs  subvolume create /mnt/@vms
umount /mnt

Mount the subvolumes to their respective places

mount -o noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@ /dev/mapper/arch /mnt
mkdir /mnt/{boot,home,var,swap,var/cache/pacman/pkg,vms,swap}
mkdir -p /mnt/{boot,home,var,swap,vms,swap}
mount -o noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@home /dev/mapper/arch /mnt/home
mount -o noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@var /dev/mapper/arch /mnt/var
mkdir -p /mnt/var/cache/pacman/pkg
mount -o noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@pacman /dev/mapper/arch /mnt/var/cache/pacman/pkg
mount -o noatime,nodatacow,ssd,discard=async,space_cache=v2,subvol=@vms /dev/mapper/arch /mnt/vms
mount -o noatime,compress=zstd,ssd,discard=async,space_cache=v2,subvol=@swap /dev/mapper/arch /mnt/swap
mount /dev/nvme0n1p1 /mnt/boot

Install the base system

pacstrap /mnt base linux linux-firmware git vim btrfs-progs
genfstab -U /mnt >> /mnt/etc/fstab

Tip: Now is a good time to backup your history file back onto the USB you’ve booted with. This prevents you form manually re-entering all the mount commands again in case you do need to boot again from the install media. Just copy the history.txt file back to /root/.zsh_history and open a new tty with Alt+Left

 mkdir /usb
 mount /dev/sda1 /usb
 cp .zsh_history /usb/history.txt

Chroot!

arch-chroot /mnt