mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-28 07:44:52 +00:00
78 lines
2 KiB
Diff
78 lines
2 KiB
Diff
|
From 53e38c3eefd1e5f41bf1f3b5bc7bae4e5b667ff1 Mon Sep 17 00:00:00 2001
|
||
|
From: Peter Jones <pjones@redhat.com>
|
||
|
Date: Mon, 27 Oct 2014 09:22:55 -0400
|
||
|
Subject: [PATCH 154/154] Try to emit linux16/initrd16 and linuxefi/initrdefi
|
||
|
in 30-os_prober.
|
||
|
|
||
|
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
|
||
|
index 9f955ab..908a09d 100644
|
||
|
--- a/util/grub.d/30_os-prober.in
|
||
|
+++ b/util/grub.d/30_os-prober.in
|
||
|
@@ -135,6 +135,28 @@ for OS in ${OSPROBED} ; do
|
||
|
LONGNAME="${LABEL}"
|
||
|
fi
|
||
|
|
||
|
+ 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
|
||
|
@@ -235,11 +257,11 @@ EOF
|
||
|
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
|
||
|
@@ -255,11 +277,11 @@ EOF
|
||
|
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
|
||
|
--
|
||
|
1.9.3
|
||
|
|