[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1009807: Kernels with no compression support no longer work



Control: tag -1 moreinfo

On Mon, 2022-04-18 at 13:30 +0300, Raul Tambre wrote:
> Package: initramfs-tools
> Version: 0.141
> Severity: important
> 
> Dear maintainer,
> 
> I was using a custom downstream kernel required for my hardware. The 
> kernel had only CONFIG_RD_XZ enabled, which I wasn't aware of.
> With version 0.141 initramfs creation fails with:
> 
>    Processing triggers for initramfs-tools (0.141) ...
>    update-initramfs: Generating /boot/initrd.img-4.14.102-rt53
>    grep: /boot/config-4.14.102-rt53: No such file or directory
>    W: zstd compression (CONFIG_RD_ZSTD) not supported by kernel, using gzip
>    grep: /boot/config-4.14.102-rt53: No such file or directory
>    E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
>    update-initramfs: failed for /boot/initrd.img-4.14.102-rt53 with 1.
>    dpkg: error processing package initramfs-tools (--configure):
>     installed initramfs-tools package post-installation script 
> subprocess returned error exit status 1
> 
> After commit 035190cc4385c0441dddc1bbaba000cf7f1f179b the code tries to 
> default to gzip if the first method didn't work, and errors if so. 
> Previously it would fall back to no compression.
[...]

I think you are being confused by the "early initramfs" that is
prepended to the main initramfs.  The early initramfs contains x86
microcode and must be uncompressed.  The main initramfs presumably can
be uncompressed, but initramfs-tools has never supported that and has
only ever had a fallback to gzip, which was assumed to be supported by
all kernel configurations.

It seems to me that your custom kernels have been booting without
actually using the main initramfs, because they could not decompress it
and they had all the necessary drivers built-in.

If you don't want or need an initramfs then (assuming you use "make
deb-pkg") you can disable CONFIG_BLK_DEV_INITRD and the package will
then also disable building an initramfs on installation.

If you do want an initramfs, then you should make sure the initramfs-
tools and kernel configurations agree on which compression method to
use.

Ben.

-- 
Ben Hutchings
To err is human; to really foul things up requires a computer.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: