I have a system which was installed with Ubuntu 22.04 in March 2024 using ZFS with ZFS native encryption (creating bpool and rpool). Following the upgrade to 24.04, I have 3 kernel versions, starting with the same parameters, which have 1 working and 2 failing outcomes with different errors related to ZFS. I cannot understand why the kernel being loaded should matter and how to address the issue.
linux-image-6.8.0-47-generic - works
linux-image-6.8.0-48-generic - fails, “cannot import rpool: no such pool or dataset”, zpool status shows “no pools available”
linux-image-6.8.0-49-generic - fails, “mounting rpool/ROOT/ubuntu_[snip] on /root// failed: Permission denied”
MATE desktop environment - not relevant to the issue
Yes I found several reports of this issue, none with any explanation on why/how this can happen. Some speculation that reimporting the pool might fix the issue, though given my solution I’m not sure how. I didn’t think it was useful to list all of the links to people failing to get support on this issue. Perhaps the relevant launchpad bugs would have been appropriate though.
Because this was a bootup issue and a difference between kernels, the obvious culprit would seem to be initramfs. I was not able to eliminate this as an option because I didn’t want to risk an unbootable system (though I did have a complete backup, that was a big time commitment to restore). So I didn’t ever upgrade the initramfs of the image that was working.
Presumably the necessary scripts for zfs encryption are in cryptsetup-initramfs and none of these depend on that package:
ubuntu-desktop
ubuntu-desktop-minimal
ubuntu-mate-desktop
ubuntu-standard
ubuntu-minimal
My assumption is that some package depended on it in 22.04 that was changed in 24.04 and cryptsetup and cryptsetup-initramfs were removed as part of the cleanup of unnecessary packages following the 24.04 upgrade.