Public bug reported:
Summary: do-release-upgrade from 24.04 to 26.04 on an encrypted ZFS
root: the first "systemctl daemon-reload" after zfsutils-linux 2.4.1 is
unpacked unmounts all ZFS datasets, kills the desktop session and leaves
the upgrade half-finished
Environment:
- Ubuntu 24.04 LTS -> 26.04.1 LTS (resolute), via do-release-upgrade (text
view, run from a GNOME Terminal in a Wayland session)
- Ubuntu Desktop installed with the "ZFS with encryption" layout: rpool
(aes-256-gcm, keylocation file:///run/keystore/rpool/system.key), bpool,
datasets from /etc/zfs/zfs-list.cache/rpool
- zfsutils-linux 2.2.2-0ubuntu9.5 -> 2.4.1-1ubuntu5.1
- systemd 255.4-1ubuntu8.17 -> 259.5-0ubuntu3.4
- ubuntu-release-upgrader-core 1:26.04.25
What happened:
The upgrade ran normally for about 25 minutes of package installation, then the
whole desktop session was torn down while dpkg was still running. The terminal
running the upgrader disappeared, dpkg was left waiting on a conffile prompt
(/etc/apparmor.d/signal-desktop) with no terminal, and the journal stopped
logging. I had to power-cycle, boot into recovery mode, and finish with "dpkg
--configure -a" and "apt full-upgrade". The system is fine now.
Timeline from the logs (all 2026-09-29, journal boot -3):
21:29:04 systemd 259.5 unpacked and re-executed (Reexecuting. / systemd
259.5-0ubuntu3.4 running in system mode)
21:29-21:36 several "Reload requested from client ... ('systemctl')"
daemon-reloads from package postinsts, all harmless
21:37:16 zfsutils-linux, libnvpair3linux, zfs-initramfs, zfs-zed upgraded
(unpacked) to 2.4.1-1ubuntu5.1
21:43:18 dpkg configures tpm-udev; its postinst runs "systemctl --system
daemon-reload"
21:43:19 systemd[1]: Reloading finished in 596 ms.
21:43:19 systemd[1]: -.mount: Failed to enqueue stop job, ignoring: Job type
stop is not applicable for unit -.mount.
21:43:19 systemd[1]: Stopping session-2.scope - Session 2 of User bernt...
21:43:19 systemd[1]: Stopped anacron.timer / apt-daily.timer /
apt-daily-upgrade.timer / dpkg-db-backup.timer / fstrim.timer / logrotate.timer
/ man-db.timer ... (every timer)
21:43:19 systemd[1]: Unmounting root.mount, srv.mount, usr-local.mount,
var-games.mount, var-lib-NetworkManager.mount, var-lib-apt.mount,
var-lib-dpkg.mount, var-mail.mount, var-spool.mount, var-www.mount, all snap
mounts, all docker
overlay mounts ...
21:43:19 systemd[1]: Stopping accounts-daemon, bluetooth, bolt, colord,
power-profiles-daemon, cups, systemd-timesyncd, upower, unattended-upgrades ...
21:43:19 gdm-password][4867]: pam_unix(gdm-password:session): session closed
for user bernt
21:43:19 journal of that boot ends
21:44:04 dpkg.log: last entry (configure apparmor), then dpkg sits at the
conffile prompt with no terminal
22:03 power-cycle, recovery mode
Root cause (as far as I can tell):
This is the same mechanism as LP: #1993318 ("systemctl daemon-reload must not
unmount half of mountpoints"), but hit during a release upgrade instead of
first boot, and triggered by a unit rename rather than an empty zfs-list.cache.
On 24.04 (zfs 2.2.2) the mount generator created the key-loading unit as
zfs-load-key-rpool.service and that is the unit that ran at boot:
sep. 29 09:31:56 systemd[1]: Finished zfs-load-key-rpool.service - Load ZFS key
for rpool.
The 26.04 generator (zfs 2.4.1) emits the unit as
[email protected]
and every generated mount unit for rpool binds to it, e.g.
/run/systemd/generator/-.mount:
Before=zfs-mount.service local-fs.target
[email protected]
Wants=
[email protected]
The first daemon-reload after the new package was unpacked ran the new
generator, so all mount units for the root pool became BindsTo= a unit
that had never been started in that boot and was therefore inactive.
systemd then stopped every unit bound to it (the "-.mount: Failed to
enqueue stop job" line is the root mount being spared only because it
cannot be stopped), and the loss of /var/lib/dpkg, /home, the timers'
RequiresMountsFor= targets etc. cascaded into stopping the user session
and most services while dpkg was mid-run.
Expected behaviour:
A daemon-reload during a release upgrade must never unmount the root pool's
datasets. The generator (or the package's postinst/preinst) should keep the old
unit name working, or mark the renamed key unit as already satisfied when the
key is already loaded, so that BindsTo= does not trigger a stop.
Additional observation:
The text-mode upgrader tries to run inside GNU screen for exactly this kind of
failure, but logged "screen could not be run" at start (20:52) because screen
was not installed on this Desktop system; it was only installed as part of the
upgrade at 21:28. So the built-in safety net was absent.
ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: zfsutils-linux 2.4.1-1ubuntu5.1
ProcVersionSignature: Ubuntu 7.0.0-34.34-generic 7.0.14
Uname: Linux 7.0.0-34-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.34.1-0ubuntu0.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Sep 29 22:44:03 2026
InstallationDate: Installed on 2025-12-01 (302 days ago)
InstallationMedia: Ubuntu 24.04.3 LTS "Noble Numbat" - Release amd64
(20250805.1)
SourcePackage: zfs-linux
UpgradeStatus: Upgraded to resolute on 2026-09-29 (0 days ago)
modified.conffile..etc.sudoers.d.zfs: [inaccessible: [Errno 13] Permission
denied: '/etc/sudoers.d/zfs']
** Affects: zfs-linux (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug resolute wayland-session
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2168897
Title:
24.04 to 26.04 upgrade on encrypted ZFS root: first daemon-reload
after zfsutils-linux 2.4.1 is unpacked unmounts all datasets and kills
the session
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/2168897/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs