initramfs created with incompatible compression

Bug #2006789 reported by Dominique Martinet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools
New
Undecided
Unassigned

Bug Description

I've recently done an upgrade from focal (20.04) to jammy (22.04) through dist-upgrade (do-release-upgrade was apparently attempted previously, leaving the repositories configured to jammy without actually having installed most package -- the start point is a bit weird, but bear with me)

The dist-upgrade did not install a new kernel through linux-image-*-generic, so I was left with the old 5.4 from the previous distro.
However, initramfs-tools was upgraded, so the initrd was rebuilt.. with new compression options compressed as ZSTD.

linux 5.4 unfortunately does not support zstd, so the machine was left unable to boot. This was made worse by the fact that there were no older kernels (which might have a pristine initramfs), so recovery without initrd was quite difficult (boot through usb in remote enivronment... much joice happened)

Anyway, this wouldn't have been a problem if the kernel had been selected properly, but I believe initramfs-tools could (should?) check if /boot/config-<uname> exists whether the kernel supports CONFIG_DECOMPERSS_<compression> before processing. In case the compression isn't supported either some fallback and a warning, or some hard error would be great.
(lack of /boot/config-* can definitely be ignored, but it should be present most of the time -- let's make use of the info we have)

Thanks!

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.