Description: fix multiple initrds support in initrd-less patch Previously the initrd-less patch, incorrectly emitted initrd stanza with a single prefix only. Where as, upstream 2.04 has support for multiple initrd and was correctly doing echo of prefixed initrd. So this is a correction of the initrd-less patch rebase on top of 2.04 release. After fixing that, the ubuntu-only patch to fixup "whitespace without early initrd" is now redundant. In addition, I've now added support for init-less early initrds to be loaded by the initrd-less codepath. This way, we can ship microcode updates, whilst still performing initrd-less boot. This is diff between the new patched-ubuntu vs the patched-old-ubuntu, as git-dpm trees make it hard to review when one drops patches, and patches the old patch. diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index 3eb0e6936..14a89ba13 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -245,6 +245,14 @@ EOF linux_root_device_thisversion="PARTUUID=${GRUB_FORCE_PARTUUID}" fi message="$(gettext_printf "Loading initial ramdisk ...")" + initrd_path= + for i in ${initrd}; do + initrd_path="${initrd_path} ${rel_dirname}/${i}" + done + initrd_path_only_early= + for i in ${initrd_early}; do + initrd_path_only_early="${initrd_path_only_early} ${rel_dirname}/${i}" + done if test -n "${initrd}" && [ x"$GRUB_FORCE_PARTUUID" != x ]; then sed "s/^/$submenu_indentation/" << EOF if [ "\${initrdfail}" = 1 ]; then @@ -255,11 +263,17 @@ EOF echo '$(echo "$message" | grub_quote)' EOF fi - sed "s/^/$submenu_indentation/" << EOF - initrd ${rel_dirname}/${initrd} + initrd $(echo $initrd_path) else linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} panic=-1 +EOF + if [ -n "$initrd_path_only_early" ]; then + sed "s/^/$submenu_indentation/" << EOF + initrd $(echo $initrd_path_only_early) +EOF + fi + sed "s/^/$submenu_indentation/" << EOF fi initrdfail EOF @@ -277,7 +291,7 @@ EOF EOF fi sed "s/^/$submenu_indentation/" << EOF - initrd ${rel_dirname}/${initrd} + initrd $(echo $initrd_path) EOF fi fi @@ -418,10 +432,7 @@ while [ "x$list" != "x" ] ; do initrd= if test -n "${initrd_early}" || test -n "${initrd_real}"; then - initrd="${initrd_real}" - if test -n "${initrd_early}"; then - initrd="${initrd_early} ${initrd}" - fi + initrd="${initrd_early} ${initrd_real}" initrd_display= for i in ${initrd}; do