Install snap-pac
.
sudo pacman -S snap-pac
Put /home
in a separate subvolume. If you are using the default subvolume layout, this should already be done for you.
Install grub-btrfs
and inotify-tools
.
sudo pacman -S grub-btrfs inotify-tools
Enable the grub-btrfs
daemon so new snapshots are automatically added to the Grub menu.
sudo systemctl enable --now grub-btrfsd
Regenerate the Grub configuration file.
sudo grub-mkconfig -o /boot/grub/grub.cfg
You may wish to add GRUB_BTRFS_SNAPSHOT_KERNEL_PARAMETERS="rd.live.overlay.overlayfs=1"
to /etc/default/grub-btrfs/config
for booting snapshots read only. See here for more information about that: https://github.com/Antynea/grub-btrfs/blob/master/initramfs/readme.md#dracut-based-distros
Afterward, regenerate a new snapshot submenu.
sudo /etc/grub.d/41_snapshots-btrfs
Reboot and test that you are able to boot to a snapshot from Grub.