Repeatable system setup for Arch Linux (CachyOS).
- Boot into CachyOS live USB (UEFI mode)
- Use the GUI installer:
- Create FAT32 EFI partition (1024MB, mount at
/boot/efi) - Create ZFS root partition with encryption enabled
- Select KDE Plasma as desktop environment
- Create FAT32 EFI partition (1024MB, mount at
- If installer crashes, try:
rm -r ~/.cacheandsudo calamares
After initial install, configure ZFSBootMenu properties:
sudo zfs get encryption
sudo zfs set org.zfsbootmenu:bootfs="zpcachyos/ROOT/cos/root" zpcachyos
sudo zfs set org.zfsbootmenu:rootprefix="root=ZFS=" zpcachyos
sudo zfs set org.zfsbootmenu:commandline="rw quiet splash" zpcachyos
sudo zfs get mountpoint
sudo zfs mount zpcachyos/ROOT/cos/rootsudo arch-chroot /tmp/calamares-root-XXX
mount /dev/nvme0n1p1 /boot/efi
refind-install
pacman -S zfsbootmenu
generate-zbm --enable
generate-zbm
exit
sudo zpool export zpcachyos
rebootIn ZFSBootMenu, press Ctrl+D to set pool as default.
Pool feature upgrades: after OpenZFS updates, zpool status will suggest zpool upgrade. The ZFSBootMenu EFI image embeds its own ZFS module, which must understand the pool's enabled features — so always regenerate the boot image before upgrading the pool, never the reverse:
sudo generate-zbm
sudo zpool upgrade zpcachyosFeature flags can't be removed once enabled, and old ZBM images (and older live media) may refuse to import the pool afterwards. Keep a recent CachyOS live USB as the fallback boot path.
Snapshots: two independent mechanisms:
sanoid.timersnapshotszpcachyos/ROOT/cos/home(autosnap_*, retention inmisc/sanoid.conf). Data-only, not bootable.- The pacman hook (
misc/zfs-snapshot.hook) recursively snapshotszpcachyos/ROOT/cosbefore every transaction (pre-update-*, keeps 3 per dataset). Therootsnapshots are bootable recovery points: boot them read-only from the ZFSBootMenu menu; clone + promote to make a rollback permanent.
- Enable CachyOS updater from greeter and install the gaming packages.
- Create user accounts for family members.
- Run the setup script:
git clone git@github.com:dieuwedeboer/dotfiles.git
cd dotfiles
./scripts/install.shThe install script will:
- Install chezmoi if not present
- Link dotfiles via chezmoi
- Link emacs config
- Install packages and configure system
- Optionally configure rEFInd with a custom theme (glow) if no custom theme is present
Avoid typing the ZFS password twice at boot:
sudo nano /etc/zfs/zroot.key
# Enter password (plain text, no newline at end!)
sudo chmod 600 /etc/zfs/zroot.key
sudo zfs change-key -o keylocation=file:///etc/zfs/zroot.key -o keyformat=passphrase zpcachyos
echo 'FILES+=(/etc/zfs/zroot.key)' | sudo tee -a /etc/mkinitcpio.conf
sudo mkinitcpio -PThe legacy-ubuntu branch contains the old Ubuntu setup using Ansible.
It is no longer maintained.