5

So I'm running Ubuntu 18.04 on a btrfs root. I recently rebooted because I got a notification about "restart required" after an update. The last few times I restarted this server, I had an issue where the kernel wouldn't load and I ended up in grub, and loaded the last kernel manually. This time (I had definitely run update-grub since last time) I'm in grub rescue and the usual commands don't work, so I looked at a tutorial, but when I get to insmod normal, I get the error "Compression type 0x3 not supported", and then normal yields command not found. I'm writing this post because apparently nobody has ever seen this error* and I can't figure out what it means or how to fix it. My system works fine with kernel 4.15.0-23 but not at all with 4.15.0-24, which somehow got reinstalled after I removed it.

*A web search for the error message in quotes comes up empty

1

2 Answers 2

9

The problem is not related to the kernel image version.
Looks like you have enabled zstd compression on the rootfs recently.
All new files will be compressed using this algorithm, but old ones remain unchanged.
Grub currently doesn't support zstd as btrfs compression algorithm.
Workaround:

# recompress existing images with zlib format
btrfs filesystem defrag -rc /boot

# disable compression for newly created files
chattr -Rc /boot

You can find more information by following the link below
https://forum.manjaro.org/t/bug-grub-cant-boot-zstd-compressed-filesystem/52577

2
  • Welcome to Ask Ubuntu! :-) Excellent first answer! +1 Keep up the good work!
    – Fabby
    Aug 28, 2018 at 20:47
  • 2
    That's because I'm Gentoo user =) Aug 30, 2018 at 0:00
4

To amend @eugene-bright's answer, starting from version 2.04, GRUB now supports ZSTD compression on BTRFS filesystems, so upgrade of GRUB will solve the problem. Don't forget to reinstall GRUB on the bootable disk after the upgrade, e.g.:

sudo grub-install /dev/sda

Ubuntu 19.10 already has version 2.04 in official repository, for other Ubuntus, you'll need to build GRUB from sources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.