Skip to content

zark 2.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Nov 13:47
· 21 commits to main since this release
v2.2.0
458ab31

zark 2.2.0 supports Ubuntu 26.10, whose installer puts /boot on an ext4 partition and makes no bpool on UEFI machines, alongside Ubuntu 24.04 LTS and 26.04 LTS as their installers lay out ZFS, all with Secure Boot on. It is published in the PPA for the three series.

What's new

  • Systems with /boot on ext4 (Ubuntu 26.10 and later on UEFI). zark setup creates, with your consent, rpool/ROOT/<be>/zark-boot, an encrypted copy of /boot inside the boot environment, and backup and prepare refresh it before every point, so each point holds the root and its /boot together. recover lays the disk out as it was (ESP, /boot, swap, rpool, no bpool), recreates /boot with a new UUID, which it writes in GRUB's configuration (the search lines of /boot/grub/grub.cfg and the ESP's grub.cfg) and in fstab, points crypttab's swap line at the new swap partition's PARTUUID, and checks the result. The layout is read at every run; anything else is refused with its reason. zark status, the login message and zark monitor show /boot's free space.
  • Each backup point records the zark that wrote it, and a point of an ext4 system the zark it needs to be recovered (2.2.0): recover refuses, before erasing anything, a point it cannot recover, and zark status shows both per drive.
  • Drives recognised by the disk, not by the enclosure. A USB enclosure's name is made by its bridge, so two disks moved through one enclosure share it, and 2.1 could take one for the other. 2.2 registers a drive under the disk's own name and recognises it by the pool label on the disk (a drive whose enclosure hides the disk's name keeps the enclosure's name in the registry, and its pool label still tells it apart); purge and prepare remove a registry entry only on that evidence and ask about one that matches by the enclosure's name alone (kept by default). Names that some bridges give every disk alike (a shared wwn- or scsi- name) are never taken as a disk's identity.
  • A refused drive is left as it was: a pool imported for a command that turns out to be another drive's (its GUID is not the expected one) is exported and refused by mount, recover, prune and purge, as backup already did, and purge stops before wiping if it cannot be exported.
  • A warning on Ubuntu 24.04 before upgrading to 26.04: on a system with an encrypted ZFS root, the graphical upgrade can stop halfway because of Ubuntu's ZFS packages (not zark's bug; it affects any such system). zark status, the login message and zark setup say so on an exposed 24.04 host, with the recovery if it already happened, and point to docs/UPGRADING.md, which has the steps that avoid the stop, run in the same boot session right before the upgrade.
  • Shell completion: zark completes its commands, subcommands, options and arguments (whole disks, registered drives, rpool's datasets, files) in bash, installed with the package and usable from a portable tree with source completion/zark; zsh can load it through bashcompinit.
  • The help in four groups (Backup, Recovery, Inspection, Setup and upkeep), each sorted by name, and the manpage the same.
  • zark monitor shows what removing a drive's oldest points frees, which 2.1 listed as a known limitation.
  • Status files with /proc mounted hidepid: a run zark cannot see is no longer taken for one that ended; a reader that cannot tell says so.
  • A public page of the platforms where the self-test has passed, by Ubuntu series, kernel and OpenZFS: https://juanmitaboada.github.io/zark/
  • The self-test checks what the ext4 layout relies on (/boot's file system, zark-boot's round trip, GRUB's selections, the rewrites), the 24.04 upgrade's condition, the drives' names by kind and a refused import: 73 checks at level 1, 10 more at level 2.

The full list is in CHANGELOG.md.

Upgrading from 2.1

sudo apt upgrade. On Ubuntu 24.04 and 26.04 no zark setup run is needed.

The drives' registry. Nothing changes at the upgrade, nothing on the drives changes, and no zark setup run is needed for it: each entry of /etc/zark/known_drives.json is corrected the first time its drive is connected and its pool verified by zark backup or zark registry fix, and keeps the enclosure's name beside the disk's when the disk shows its own. No entry is dropped and no anchor touched. Until an entry is corrected, purge and prepare ask about a drive that matches it only by the enclosure's name, and keep it by default. Going back to 2.1.1 works: it reads and keeps the new field, and 2.2 corrects the entry again at the next verified connection.

On Ubuntu 26.10, which 2.1 refused: install zark 2.2, run sudo zark setup once (it asks before creating rpool/ROOT/<be>/zark-boot), then sudo zark prepare a drive as on any system.

Before recovering a point of a system with /boot on ext4, use zark 2.2.0 or later. zark 2.1.1 does not know that layout: it would erase the target disk and leave a system without /boot. Points of 24.04 and 26.04 systems (with a bpool) recover with 2.1 and 2.2 alike. Details in docs/UPGRADING.md.

Unplug the backup drive before system updates. While a backup drive is connected, zark's guards refuse changes to the boot. If a kernel is removed while a drive is visible (by apt autoremove, or by unattended-upgrades removing an old kernel), dpkg is left half-done: unplug the drive and run the apt command again (docs/USAGE.md).

Known limitations

  • The upgrade from Ubuntu 26.04 to 26.10 has not been tested with zark: Canonical had not opened it when 2.2.0 was validated.
  • A bpool point is not recovered onto the ext4 layout, nor the reverse.
  • Planned after 2.2: kernel updates with a backup drive plugged in that wait instead of failing dpkg, a check of a drive's copies without changing them, and zark status naming an interrupted last run.

Install

sudo add-apt-repository ppa:juanmitaboada/zark
sudo apt update
sudo apt install zark
sudo apt install gnome-shell-extension-zark   # optional, Ubuntu 26.04 and 26.10

For recovery from a live session, use zark_2.2.0.tar.gz below (tar xzf zark_2.2.0.tar.gz && cd zark && sudo ./zark recover). zark_2.2.0-1_amd64.deb is for machines without the PPA: it is built from the same source as the PPA's packages and versioned 2.2.0-1. The PPA's carry a series suffix and sort below it, so on a machine with the PPA, install with apt.