|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 0/2] templates/linux_xen: Properly handle multiple initrd files
On 11.08.22 21:10, Mauricio Faria de Oliveira wrote: Adding the xen-devel list as requested in grub-devel [0]: On Thu, Aug 11, 2022 at 1:51 PM Daniel Kiper <dkiper@xxxxxxxxxxxx> wrote:In general patches LGTM. However, I would prefer to hear an opinion from Xen folks too. So, please repost the patch set and add xen-devel@xxxxxxxxxxxxxxxxxxxx to the list of recipients.[0] https://lists.gnu.org/archive/html/grub-devel/2022-08/msg00115.html Thanks, Mauricio ... The linux_xen template seems to be broken for multiple initrd files. Linux fails to boot when it needs a real initrd but early/microcode initrd(s) are found by grub-mkconfig. Patch 1 allows initrd(s) other than the first early/microcode initrd to be loaded at all, fixing an implementation error for multiboot[2]. Patch 2 allows Linux to get the real initrd as initrd (vs. an early/ microcode-only initrd), thus being able to boot if it needs a initrd. Synthetic tests: --- # touch /boot/xen /boot/microcode.cpio Original: # grub-mkconfig 2>/dev/null | grep -P '^\t(multiboot|module)' multiboot /boot/xen ... module /boot/vmlinuz-5.4.0-122-generic ... module --nounzip /boot/microcode.cpio /boot/initrd.img-5.4.0-122-generic Patch 1: # grub-mkconfig 2>/dev/null | grep -P '^\t(multiboot|module)' multiboot /boot/xen ... module /boot/vmlinuz-5.4.0-122-generic ... module --nounzip /boot/microcode.cpio module --nounzip /boot/initrd.img-5.4.0-122-generic Patch 2: # grub-mkconfig 2>/dev/null | grep -P '^\t(multiboot|module)' multiboot /boot/xen ... module /boot/vmlinuz-5.4.0-122-generic ... module --nounzip /boot/initrd.img-5.4.0-122-generic module --nounzip /boot/microcode.cpio With fake multiboot2 header: # echo -en '\xd6\x50\x52\xe8\x00\x00\x00\x00' > /boot/xen # echo -en '\x00\x00\x00\x00\x2a\xaf\xad\x17' >> /boot/xen # echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' >> /boot/xen # echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' >> /boot/xen # grub-file --is-x86-multiboot2 /boot/xen; echo $? 0# grub-mkconfig 2>/dev/null | grep -P '^\t(multiboot|module)' For both patches: Acked-by: Juergen Gross <jgross@xxxxxxxx> Juergen Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc Attachment:
OpenPGP_signature
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |