Grub fails to recognise bpool filesystem when zstd compression is enabled
Ubuntu Mate 21.10
[Edit added 27th July 2022]
IMPORTANT -- This issue will also impact 22.04 and any other Debian-based distribution that has
Root and boot on ZFS (standard rpool/bpool from the installer when the system was initially built).
After changing the ZFS compression method from lz4 to zstd on bpool, grub failed to recognise the filesystem and the system was left in an un-bootable state. Booting from the live-CD and changing the compression method back to lz4 did not fix the issue. "grub-probe" reports "Unknown filesystem".
To be clear, this issue seems to stem from my changing the compression format on bpool from lz4 to zstd. The machine in question is normally running 24/7, so the problem -appeared- to be triggered by a normal run of Software Updater on June 24th 2022 (which triggered an initramfs rebuild and hence a reboot). Although the problem was triggered by it, there doesn't seem to have been any problem at all with the Software Update itself (which confused me for quite a while).
The boot failure is characterized by EFI successfully calling grub and the normal grub menu appearing, but any attempt to boot from the default kernel, back-up kernel, or previous ZFS saved snapshots from the grub history sub-menu all fail with "no filesystem found" messages.
Adding an external USB disk and copying the pools over with zfs send-receive and attempting to re-install grub on that external disk allso fails in exactly the same way.
The bpool and rpool pools can be imported successfully from the live-CD and all data is intact (a scrub runs without errors and when mounted the filesystems are all normal). As mentioned above, all of the system data can be successfully save-receive copied to a local disk or to a remote system without errors.
The only "fix" that I've found so far (to enable use of the machine) is to use ZFSBootMenu instead of grub. Obviously this isn't something that most users would want to do. I know it's a tall order (and beyond the mandate of the Ubuntu maintainers), but it would be nice to push a request for zstd support upstream to the grub team.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu grub2 Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: