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

Bug#950086: base-installer: please support configuring initramfs compression



On Wed, 2020-01-29 at 00:01 +0300, Alper Nebi Yasak wrote:
> Source: base-installer
> Version: 1.192
> Severity: wishlist
> Tags: patch

This is definitely a rather niche option, so "wishlist" is appropriate.

> Dear Maintainers,
> 
> Debian-installer can already configure initramfs-tools' MODULES setting 
> to get a smaller initramfs. I've written a patch for configuring its 
> COMPRESS setting as well, please consider applying it. I've tested it 
> using an arm64 virtual machine with a custom built netboot image.
> 
> I'm doing something like flash-kernel & flash-kernel-installer for 
> chromebooks, which have size limits on kernel + initramfs + etc. If the 
> installer step fails due to initramfs size I'll be asking these two 
> questions to the user with a higher priority, regenerate the initramfs, 
> and retry the step. Such a flow could be implemented for flash-kernel as 
> well, and I think having at least the question template here would be great.

Looking at the patch:

[...]
> --- a/debian/templates-arch
> +++ b/debian/templates-arch
> @@ -12,6 +12,12 @@ Default[armel]: dep
>  Description: for internal use
>   Default driver inclusion policy for initramfs-tools
>  
> +Template: base-installer/kernel/linux/initramfs-tools/compression
> +Type: string
> +Default: gzip
> +Description: for internal use
> + Default compression method for initramfs-tools
[...]
> --- a/library.sh
> +++ b/library.sh
[...]
> +			if [ "$RET" = xz ] || [ "$RET" = lzma ]; then
> +				log-output -t base-installer apt-install xz-utils
> +			else
> +				log-output -t base-installer apt-install "$RET"
> +			fi

So it's possible to set any arbitrary string, but if you set it to
anything other than "gzip", "xz", or "lzma" then the required
compressor might not be installed.  (And it's possible to set a string
that mkinitramfs doesn't install either.)

I think this needs to be a "select" type question, so that only the
supported compression types can be selected.

Ben.

-- 
Ben Hutchings
I'm not a reverse psychological virus.
Please don't copy me into your signature.


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


Reply to: