commit: fdcd2c6597c04b0c2b24e1966b6d6380f5fa32bb Author: Peter Levine <plevine457 <AT> gmail <DOT> com> AuthorDate: Fri Oct 8 02:15:06 2021 +0000 Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org> CommitDate: Fri Oct 8 11:12:23 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdcd2c65
sys-boot/os-prober: fix handling of multiple initrd paths Backport of upstream fix for handling multiple initrd paths like those needed for Majaro installations. Still requires changes in grub from https://savannah.gnu.org/bugs/index.php?47681, if and when it gets merged upstream. Package-Manager: Portage-3.0.26, Repoman-3.0.3 Signed-off-by: Peter Levine <plevine457 <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/22513 Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org> ...-prober-1.79-handle-multiple-initrd-paths.patch | 35 ++++++++++++++++++++++ sys-boot/os-prober/os-prober-1.79.ebuild | 1 + 2 files changed, 36 insertions(+) diff --git a/sys-boot/os-prober/files/os-prober-1.79-handle-multiple-initrd-paths.patch b/sys-boot/os-prober/files/os-prober-1.79-handle-multiple-initrd-paths.patch new file mode 100644 index 00000000000..0b477c17c36 --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.79-handle-multiple-initrd-paths.patch @@ -0,0 +1,35 @@ +Backport handling of multiple initrd paths, like those needed by Manjaro +installations. Note, it still requires resolution of +https://savannah.gnu.org/bugs/index.php?47681 on grub's end. + +Commit: https://salsa.debian.org/installer-team/os-prober/-/commit/53b920e106f13acf87ef8a275161e20f94feeb8a + +--- a/linux-boot-probes/mounted/common/40grub2 ++++ b/linux-boot-probes/mounted/common/40grub2 +@@ -78,11 +78,21 @@ + fi + ;; + initrd) +- initrd="$(echo "$2" | sed 's/(.*)//')" +- # Initrd same. +- if [ "$partition" != "$bootpart" ]; then +- initrd="/boot$initrd" +- fi ++ shift ++ initrd="" ++ for initrd_path in "$@"; do ++ # sed hack, as above ++ initrd_path="$(echo "$initrd_path" | sed 's/(.*)//')" ++ # Initrd same. ++ if [ "$partition" != "$bootpart" ]; then ++ initrd_path="/boot$initrd_path" ++ fi ++ if [ -z "$initrd" ]; then ++ initrd="$initrd_path" ++ else ++ initrd="$initrd $initrd_path" ++ fi ++ done + ;; + "}") + entry_result diff --git a/sys-boot/os-prober/os-prober-1.79.ebuild b/sys-boot/os-prober/os-prober-1.79.ebuild index c854d403e4f..811ad1fef51 100644 --- a/sys-boot/os-prober/os-prober-1.79.ebuild +++ b/sys-boot/os-prober/os-prober-1.79.ebuild @@ -27,6 +27,7 @@ QA_MULTILIB_PATHS="usr/lib/os-prober/.*" PATCHES=( "${FILESDIR}"/${PN}-1.79-mdraid-detection.patch + "${FILESDIR}"/${PN}-1.79-handle-multiple-initrd-paths.patch "${FILESDIR}"/${PN}-1.79-btrfs-subvolume-detection.patch "${FILESDIR}"/${PN}-1.79-use-fstab-name.patch "${FILESDIR}"/${PN}-1.79-mounted-boot-partition-fix.patch
