I have an laptop running 22.04 LTS with encrypted ZFS that won't boot. The system doesn't ask for a passphrase like it used to, it now drops to an initramfs prompt with:
Key load error: Failed to open key material file: No such file or directory
Command: mount.zfs -o zfsutil rpool/ROOT/ubuntu_XXXXXX /root//
Message: zfs_mount_at() failed: encryption key not loaded
Error: 2
Failed to mount rpool/ROOT/ubuntu_XXXXXX on /root//.
Manually mount the filesystem and exit.
BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu3.1) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) _
The kernel that won't boot is 6.12.10-76061203-generic.
My workaround is to boot 5.15.0-67-generic with GRUB: Luckily that one still works.
With the working 5.x kernel I get a prompt: "Please unlock disk keystore-rpool" at the graphical splash screen. I enter the passphrase and the boot continues as expected.
While booted to the 5.x kernel, I tried to fix the 6.x kernel like so:
sudo update-initramfs -d -k 6.12.10-76061203-generic
sudo update-initramfs -c -k 6.12.10-76061203-generic
but that didn't help. I think that worked for me in the past, so I'm not sure what changed.
zfs get keystatus,keylocation bpool rpool shows:
NAME PROPERTY VALUE SOURCE
bpool keystatus - -
bpool keylocation none default
rpool keystatus available -
rpool keylocation file:///run/keystore/rpool/system.key local
Should that rpool keylocation be changed to prompt? That's how another computer I have is set up--it also uses only ZFS along with full-disk encryption. I don't remember how I initially installed Ubuntu on either machine though, and I'm afraid to change rpool keylocation and make my laptop unbootable.