Repository navigation
zark 2.3.0
zark 2.3.0 keeps the boot consistent when kernels are updated with a backup drive plugged in, and adds zark fullcheck, a check of a backup drive's copies that changes no data. It supports Ubuntu 24.04 LTS, 26.04 LTS and 26.10 as their installers lay out ZFS, all with Secure Boot on, and is published in the PPA for the three series.
What's new
- Kernel updates with a backup drive plugged in. In 2.2, a kernel that
apt autoremoveor unattended-upgrades removed while a backup drive was plugged in left dpkg half-done. Now a drive that is only plugged in is left out ofupdate-grub's scan, so kernel removals and the other updates that runupdate-grubcomplete. While a backup pool is imported (a backup, azark mount, azark fullcheck), the APT hook refuses kernel removals before dpkg starts, and a kernel prerm script refuses them at dpkg's level too; installs of a kernel, GRUB, shim or ZFS are refused while a drive is plugged in, as before.update-grubstops before it installs agrub.cfgwith no kernel entry, so the previous one stays. Ubuntu 26.10'slinux-main-modules-*packages count as the kernel's. - zark and apt take turns. zark does not import a backup pool while apt, dpkg or unattended-upgrades runs: the command stops with exit status 75 and names the process. The read-back at the end of a backup waits for apt, up to 15 minutes; a read-back that was skipped or timed out is reported as not done.
zark fullcheckverifies a backup drive's copies without changing them, in two parts: a restore check, which imports the drive read-only, mounts each datasetrecoverwould restore from a point and reads every file in it, and a scrub of the whole pool. On an encrypted drive it names the damaged files. The result is a banner, exit status 1 unless clean, and the drive's last check, shown byzark status,zark monitorandstatus.json.zark fullcheck scruborzark fullcheck restoreruns one part.zark registry verify <name>: a new drive whose first read-back could not run (apt was running) is no longer left unregistered. It waits inpending_drives.json, its anchors kept, andstatus, the login message,registry list,exploreandbackupname it;registry verifyreads it back and registers it. The read-back checks the pool's GUID.zark backup --drive <name>picks the connected registered drive by name when more than one is connected.- Smaller things:
pruneshows a table of candidate ages before it asks;zark statusnames a drive whose last run calls for attention; the external-pool login message tells a pool only plugged in from one imported;zark.lognames the user behind each command;repair-bootandzark chrootstop at a bind into the chroot that fails;health's report andsimulate's files are created privately in/tmp; a wait or a timed question reads its answer under sudo-rs. Exit statuses 2 and 75 are documented and declared an interface. - Docs: a recovery that ends in a reset loop on firmware that ignores the boot entry the system creates, and the way out (docs/TROUBLESHOOTING.md).
- The self-test gains POOL-17 (a scrub names a corrupted file, encrypted drives too; a read-only pool is refused before any scrub): 74 checks at level 1, 10 more at level 2. It passed on the five platforms of the maintainer's test machine, on 2.3.0's candidate: Ubuntu 26.10 installed (levels 1 and 2) and the 26.10, 26.04 and 24.04.5 live sessions. The platforms are listed at https://juanmitaboada.github.io/zark/
The full list is in CHANGELOG.md.
Upgrading from 2.2
sudo apt upgrade, then, once per system:
sudo zark setupThe package upgrade leaves the installed guards as they are; setup installs 2.3's (/etc/default/grub.d/zark-backup-guard.cfg, /etc/grub.d/99_zark_cfg_check, /etc/kernel/prerm.d/00-zark-backup-guard and the APT hook's line that lets it see removals). Until then zark finish says what setup would do. Nothing on a drive or in /etc/zark/known_drives.json changes.
A system 2.2 left half-done. If a kernel was removed while a backup drive was plugged in, dpkg -l shows it as rH and an apport prompt may have appeared: after sudo zark setup, run sudo apt -f install, with the drive plugged in or not.
Going back to 2.2.0 works: it reads everything 2.3 writes. Its setup does not remove the cfg file, 99_zark_cfg_check nor the prerm script; run 2.3's sudo zark setup --remove first, or remove them by hand. Details in docs/UPGRADING.md.
The GNOME Shell extension 1.2
gnome-shell-extension-zark 1.2, in the same PPA for Ubuntu 26.04 and 26.10, adds an About tab to its details window: the installed zark's version (the package's, or for a portable zark the status file's writer), the extension's and GNOME Shell's versions, and Copy buttons for sudo zark status, sudo zark selftest, sudo zark backup and zark monitor. A change from the dark style to the light one now takes effect at once. It reads the status files of zark 2.1.0 and later.
Known limitations
- The self-test's POOL-17 has not been certified on an installed Ubuntu 26.04 system (only on the 26.04 live session): with the self-test's warnings on, such a system reports it as not covered until a certificate for it exists.
- The upgrade from Ubuntu 26.04 to 26.10 has not been tested with zark.
- A bpool point is not recovered onto the ext4 layout, nor the reverse.
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.10For recovery from a live session, use zark_2.3.0.tar.gz below (tar xzf zark_2.3.0.tar.gz && cd zark && sudo ./zark recover). zark_2.3.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.3.0-1. The PPA's carry a series suffix and sort below it, so on a machine with the PPA, install with apt.