Snapshots and rollback
Undo a bad update with Btrfs snapshots.
What is saved
Fiordland uses Btrfs and snapper. A snapshot is a frozen copy of the system, not your home folder. Snapshots are taken before and after every package change, and every hour (5 hourly, 7 daily, 2 weekly and 1 monthly are kept).
snapper -c root list
Undo an update while the system works
Find the snapshot pair for the bad update in the list (the pre and post numbers), then:
sudo snapper -c root undochange PRE..POST
Restart afterwards.
Roll back when the system does not boot
Booting a snapshot from the boot menu is not supported yet. First try the Arch kernel and safe graphics boot entries. If neither works, boot the USB stick and open a terminal:
Find the partition
lsblk -f
Look for the
btrfsone, for example/dev/nvme0n1p2.Mount it
sudo mount -o subvolid=5 /dev/nvme0n1p2 /mnt
Pick a snapshot
sudo ls /mnt/@snapshots sudo cat /mnt/@snapshots/N/info.xml
The file shows the date and what caused it.
Swap it in
sudo mv /mnt/@ /mnt/@broken sudo btrfs subvolume snapshot /mnt/@snapshots/N/snapshot /mnt/@ sudo umount /mnt
Restart
Remove the stick. Once everything works, delete
@brokenthe same way you mounted it. If a kernel update caused the problem, reinstall the kernels withsudo pacman -S linux-cachyos linux.