I have a related error after a fresh install of xubuntu 22.04.1 with zfs
+ encryption:

After doing a first "apt update" followed by an "apt install" of a
package, apt and the whole X session crash and apt is broken from then
on.

Steps to reproduce:

1. Install (x)ubuntu 22.04.1 with zfs + encryption and boot installed system 
for the first time
2. apt update
3. apt install <some package>
→  apt and x session crash

It seems that the apt install triggers systemd to unmount every zfs
mount because systemd mistakenly thinks the rpool key is not loaded. It
fails unmounting /var/lib or / but succeeds with /var/lib/apt,
/var/lib/dpkg. This causes apt to not work anymore.

I observed the following:

• Somehow after the first boot of the freshly installed system, the service 
unit /run/systemd/generator/zfs-load-key-rpool.service is not generated by 
zfs-mount-generator
• Because this unit must be available and active, this seems to cause systemd 
to think that the key for the rpool is not loaded → systemd starts unmounting 
all zfs mounts after some trigger

Workaround: Reboot immediately after the first boot → service unit gets
generated and started correctly.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to zfs-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1970066

Title:
  (Encrypted) ZFS breaks 22.04 installation

Status in snapd package in Ubuntu:
  Confirmed
Status in zfs-linux package in Ubuntu:
  Confirmed
Status in snapd source package in Jammy:
  Confirmed
Status in zfs-linux source package in Jammy:
  Confirmed

Bug description:
  On a freshly installed 22.04.0 amd64 Desktop with (encrypted) ZFS, removing 
the Firefox snap breaks:
  * the current gnome-shell session - it returns to gdm3 login prompt
  * snapd - all snaps are marked 'broken'
  * dpkg - dpkg status database is lost

  Reproducible on dedicated hardware and VMs. Not reproducible on a
  default (/ on ext4) installation.

  Video showing the whole process on a freshly installed system:
  
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1970066/+attachment/5583102/+files/1970066.webm

  journalctl -b output:
  
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1970066/+attachment/5583100/+files/1970066_journal.txt

  /proc/self/mountinfo:
  
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1970066/+attachment/5583101/+files/1970066_mountinfo.txt

  Installation procedure: 
  - Minimal installation
  - Tick 'download updates'
  - Tick 'install third party software'
  - Erase disk and use ZFS + encrypt
  - Require password to log in

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1970066/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to