Stable-arch script aims to reduce risks of updating your GNU/Arch Linux on the fly.
Go to file
midov 8c76762c49 umount silently 2023-03-20 10:03:59 +01:00
examples prefix instead of root in example cfg 2021-01-01 14:42:43 +01:00 boot is now a symlink, mount bind boot during update 2021-07-26 00:27:35 +02:00
systemupdate.expect also update sigs 2021-08-19 17:40:48 +02:00 umount silently 2023-03-20 10:03:59 +01:00

Stable GNU/Arch Linux updates

Stable-arch script aims to reduce risks of updating your GNU/Arch Linux on the fly.
Have you ever compulsively run pacman -Syu just to have your kernel updated and suddenly you cannot even mount NFS shares anymore?
Or that one time you updated qt packages and now your file manager does not start?

With zfs, cloning your filesystem basically costs nothing. We can take snapshot of currently running filesystem, clone it run all the updates in the chroot on cloned dataset. The script also adds new entry in grub config and sets it as a default boot entry, so after you reboot you go directly to the new root. Old clones and grub entries are left untouched until you decide to remove during next update process.


  • zfs
  • grub
  • expect
  • fzf
  • arch-install-scripts


For this script to work properly, you will have to adjust your grub.cfg manually.
The script assumes you have /boot/grub/grub.d directory, where we will store all new OS clones to boot from.
Consider putting /boot/grub on a separate partition but leave /boot with rest of the system, so you can you can utilize savedefault option properly, while the kernel rolls back with the rest of the system.
If you use separate boot pool (for encrypted root for example), your boot directory will become a symlink to the current boot dataset

There is example grub config with os config template in the examples dir.

  • Create configuration in /etc/stable-arch/config file.
  • Set the parent dataset under which we will clone new root datasets in 'rootzpool'.
  • Set your user with sudoer rights so you can build new aur packages in 'sudouser.
  • Set your prefered aur manager (or pacman) in 'packagemanager'.
  • Put your root_template in /boot/grub/grub.d
  • if you have custom shell prompt set up, define it in systemupdate.expect (set prompt parameter)
  • run as root or with sudo

my grub screen