#972122 cloud kernel 5.5.0-2 does not boot from grub-xen

Package:
grub-xen
Source:
grub2
Description:
GRand Unified Bootloader, version 2 (Xen version)
Submitter:
Aleksi Suhonen
Date:
2021-03-03 12:57:05 UTC
Severity:
important
Tags:
#972122#5
Date:
2020-10-12 21:56:00 UTC
From:
To:
Linux cloud image 5.5.0-2 refuses to boot in a Xen VM from grub-xen.
Older versions up to and including 5.5.0-1 work, and all versions after
5.5.0-2 fail to boot.

Here's the error message:

Loading Linux 5.6.0-1-cloud-amd64 ...
error: not xen image.
Loading initial ramdisk ...
error: you need to load the kernel first.

I ran a diff between the config files packaged with 5.5.0-1 and 5.5.0-2
and couldn't find any significant differences other than:


< CONFIG_KERNEL_XZ=y
---
 > # CONFIG_KERNEL_XZ is not set

< # CONFIG_KERNEL_LZ4 is not set
---
 > CONFIG_KERNEL_LZ4=y


I don't really know how the grub works internally, but it seems to me
that we're missing lz4io.mod? Is there a way to force grub-xen to load
the image, even tho it's not recognized as a xen image?

Best Regards,

#972122#10
Date:
2021-02-07 15:08:46 UTC
From:
To:
Control: tag -1 upstream

I think that's the case (or something similar).  This will need to be
fixed upstream.

On one of my own systems I managed to get this working using advice from
this StackExchange question:

https://unix.stackexchange.com/questions/583714/xen-pvgrub-with-lz4-compressed-kernels

#972122#17
Date:
2021-03-03 12:46:11 UTC
From:
To:
Hello,

Good.

Package: extract-vmlinux
Priority: optional
Section: kernel
Architecture: all
Version: 0.1-1
Depends: binutils, lz4 | xz-utils
Suggests: gzip, bzip2, lzma, lzop, zstd
Description: Decompress Linux kernels for environments that cannot
handle compressed kernels

The original extract-vmlinux script seems to be under GPL and you could
include your own modified kernel postinst hook under
/usr/share/doc/extract-vmlinux/examples/...

If you really feel fancy, you could write a post install script for the
package that suggests it could install the kernel postinst hook in the
correct location, if it detects Xen and a cloud kernel?

(I would do it myself, except the hurdle of learning all the hoops to
jump through to create an acceptable debian package with no prior
knowledge is really high these days...)

Best Regards,