Stable-arch script aims to reduce risks of updating your GNU/Arch Linux on the fly.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
loliware 5701899ab3 awkism 5 months ago
examples prefix instead of root in example cfg 5 months ago update readme 1 year ago
systemupdate.expect info message 5 months ago awkism 5 months ago

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


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.

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