[Top][All Lists]

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

Re: grub2 + xen + lz4 kernels

From: Juergen Gross
Subject: Re: grub2 + xen + lz4 kernels
Date: Tue, 30 Nov 2021 07:21:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0

On 30.11.21 00:25, Shaun Reitan wrote:
I currently use XEN to boot PV (paravirt) virtual server instances for our customers. Grub2 introduced support for booting a xen kernel directly from a guests disk image which has worked great for years. We use the following command to build our image

grub-mkstandalone -O x86_64-xen -o grub2-x86_64.gz boot/grub/grub.cfg

What we have been seeing more and more is newer distros like Ubuntu 20.04 using lz4 compressed kernel images which will not boot and displays the error "not xen image."

If i use the <> utility to decompress the kernel image I am able to boot it without any issues using our current grub2 xen loader.

My question is how can I get lz4 support added into grub2 for xen? We are willing to pay for a dev to add this support if needed as I have limited time to really dig into this.

There are a few workarounds out their, most involve a hook that decompresses the kernel after an update but I'm not wanting to add complexity to the kernel update process. It leaves too much room for error and the possibility of a clients server failing to boot after what should of been a simple kernel upgrade.

Any help, even if just pointing me in the right direction would be appreciated!

Hmm, Grub2 already supports some compression methods, so adding LZ4
shouldn't be that hard. Especially as there already is some LZ4
support hidden in the ZFS handling.

I guess this LZ4 support wants to be put into a grub module of its
own and then be added to the filter list.

You should have a look at:

- GRUB_FILE_FILTER_GZIO for an example how a compression filter is
  added via grub_file_filter_register()

- the file grub-core/fs/zfs/zfs_lz4.c for current LZ4 support in

This should basically do the job.

I've added Daniel to Cc: as he might have some more thoughts.


Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]