2018-04-11 18:42:03 +00:00
|
|
|
From 5f89c77c7cff17c931f1ea52af0c39df8ab28ac9 Mon Sep 17 00:00:00 2001
|
2014-10-27 13:30:50 +00:00
|
|
|
From: Peter Jones <pjones@redhat.com>
|
|
|
|
Date: Mon, 27 Oct 2014 09:22:55 -0400
|
2018-05-10 15:48:20 +00:00
|
|
|
Subject: [PATCH 127/238] Try to emit linux16/initrd16 and linuxefi/initrdefi
|
2017-06-16 19:31:32 +00:00
|
|
|
in 30-os_prober.
|
2014-10-27 13:30:50 +00:00
|
|
|
|
|
|
|
Resolves: rhbz#1108296
|
|
|
|
|
|
|
|
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
|
---
|
|
|
|
util/grub.d/30_os-prober.in | 30 ++++++++++++++++++++++++++----
|
|
|
|
1 file changed, 26 insertions(+), 4 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
|
2018-02-27 18:56:41 +00:00
|
|
|
index 9b8f5968e2d..dc98eace934 100644
|
2014-10-27 13:30:50 +00:00
|
|
|
--- a/util/grub.d/30_os-prober.in
|
|
|
|
+++ b/util/grub.d/30_os-prober.in
|
2016-03-04 18:32:29 +00:00
|
|
|
@@ -141,6 +141,28 @@ for OS in ${OSPROBED} ; do
|
|
|
|
# os-prober returns text string followed by optional counter
|
|
|
|
CLASS="--class $(echo "${LABEL}" | LC_ALL=C sed 's,[[:digit:]]*$,,' | cut -d' ' -f1 | tr 'A-Z' 'a-z' | LC_ALL=C sed 's,[^[:alnum:]_],_,g')"
|
2014-10-27 13:30:50 +00:00
|
|
|
|
|
|
|
+ sixteenbit=""
|
|
|
|
+ linuxefi="linux"
|
|
|
|
+ initrdefi="initrd"
|
|
|
|
+ case "$machine" in
|
|
|
|
+ i?86|x86_64)
|
|
|
|
+ sixteenbit="16"
|
|
|
|
+ linuxefi="linuxefi"
|
|
|
|
+ initrdefi="initrdefi"
|
|
|
|
+ ;;
|
|
|
|
+ aarch64)
|
|
|
|
+ linuxefi="linux"
|
|
|
|
+ initrdefi="initrd"
|
|
|
|
+ esac
|
|
|
|
+ linux="linux${sixteenbit}"
|
|
|
|
+ initrd="initrd${sixteenbit}"
|
|
|
|
+ # there's no way to tell that the /other/ os is booting through UEFI,
|
|
|
|
+ # but if we are it's an okay bet...
|
|
|
|
+ if [ -d /sys/firmware/efi ]; then
|
|
|
|
+ linux=$linuxefi
|
|
|
|
+ initrd=$initrdefi
|
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2
|
|
|
|
|
|
|
|
case ${BOOT} in
|
2016-03-04 18:32:29 +00:00
|
|
|
@@ -241,11 +263,11 @@ EOF
|
2014-10-27 13:30:50 +00:00
|
|
|
save_default_entry | grub_add_tab
|
|
|
|
printf '%s\n' "${prepare_boot_cache}"
|
|
|
|
cat << EOF
|
|
|
|
- linux ${LKERNEL} ${LPARAMS}
|
|
|
|
+ ${linux} ${LKERNEL} ${LPARAMS}
|
|
|
|
EOF
|
|
|
|
if [ -n "${LINITRD}" ] ; then
|
|
|
|
cat << EOF
|
|
|
|
- initrd ${LINITRD}
|
|
|
|
+ ${initrd} ${LINITRD}
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
cat << EOF
|
2016-03-04 18:32:29 +00:00
|
|
|
@@ -261,11 +283,11 @@ EOF
|
2014-10-27 13:30:50 +00:00
|
|
|
save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
|
|
|
|
printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
|
|
|
|
cat << EOF
|
|
|
|
- linux ${LKERNEL} ${LPARAMS}
|
|
|
|
+ ${linux} ${LKERNEL} ${LPARAMS}
|
|
|
|
EOF
|
|
|
|
if [ -n "${LINITRD}" ] ; then
|
|
|
|
cat << EOF
|
|
|
|
- initrd ${LINITRD}
|
|
|
|
+ ${initrd} ${LINITRD}
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
cat << EOF
|
|
|
|
--
|
2018-05-10 15:48:20 +00:00
|
|
|
2.17.0
|
2014-10-27 13:30:50 +00:00
|
|
|
|