Stable-arch script aims to reduce risks of updating your GNU/Arch Linux on the fly.
Go to file
loliware 5701899ab3 awkism 2021-01-06 18:07:26 +00:00
examples prefix instead of root in example cfg 2021-01-01 14:42:43 +01:00
readme.md update readme 2020-02-21 00:20:36 +01:00
systemupdate.expect info message 2021-01-01 15:04:32 +01:00
update.sh awkism 2021-01-06 18:07:26 +00:00

readme.md

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.

Dependencies

  • zfs
  • grub
  • expect
  • fzf

Configuration

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 update.sh as root or with sudo

my grub screen