Changing ZFS compression to type "zstd" on "bpool" will make system un-bootable and effectively irrecoverable

Bug #1982897 reported by Nosehair
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

This problem impacts 21.10, 22.04 and basically any other Debian-based distribution with root-on-ZFS capability using grub2 versions up-to and including 2.06.

   Changing ZFS compression to type "zstd" on the filesystem "bpool" will cause a complete boot failure the next time that Software Updater requests an initramfs rebuild or new kernel install. The system will no longer boot normal or "recovery" kernels and becomes effectively irrecoverable, as Grub2 does not recognize any ZFS filesystem with zstd compression (and just changing bpool compression type back to "lz4" will not fix it).

    Any attempt to re-install grub, or check device state using grub-probe results in an "unknown filesystem" error from grub. The filesystems themselves are undamaged and are accessible from a live-CD boot (ie:- where the kernel is already running).

   Checking the upstream code for grub2 shows that the "zstd" library was added in November of 2018 and support code added for BTRFS at the same time. There doesn't appear to have been any equivalent support code added into the ZFS tree, though.

   As recovery from this problem is beyond the capabilities of most users (the easiest course of action would probably be a complete re-install), I'd like to raise a request with the upstream maintainers of grub2 to add the "zstd" support code into the ZFS tree.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: grub2 (not installed)
ProcVersionSignature: Ubuntu 5.15.0-41.44-generic 5.15.39
Uname: Linux 5.15.0-41-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl icp
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: MATE
Date: Wed Jul 27 06:44:41 2022
InstallationDate: Installed on 2022-07-17 (9 days ago)
InstallationMedia: Ubuntu-MATE 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nosehair (sbi-gaijin) wrote :
Nosehair (sbi-gaijin)
description: updated
Revision history for this message
Julian Andres Klode (juliank) wrote :

> I'd like to raise a request with the upstream maintainers of grub2 to add the "zstd" support code into the ZFS tree.

Their bug tracker is at https://savannah.gnu.org/bugs/?group=grub

Note there is no point doing any of that. The kernels are compressed as are the initramfs, so there's nothing to be gained from turning on compression on the boot pool.

Changed in grub2 (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Nosehair (sbi-gaijin) wrote :

>> Their bug tracker is at https://savannah.gnu.org/bugs/?group=grub

   Thanks for the pointer, Julian.

   Submitted #62821 as a feature request.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.