grub2/30_os-prober_UEFI_support.patch

37 lines
1.1 KiB
Diff
Raw Normal View History

From: Andrey Borzenkov <arvidjaar@gmail.com>
Date: Fri Jan 4 09:46:56 UTC 2013
Subject: properly quote translated strings in grub.cfg
References: bnc#775610
Patch-Mainline: no
Add support for chainloading another bootloader on UEFI systems.
This requires additional os-prober support to be actually useful.
Index: grub-2.00/util/grub.d/30_os-prober.in
===================================================================
--- grub-2.00.orig/util/grub.d/30_os-prober.in
+++ grub-2.00/util/grub.d/30_os-prober.in
@@ -144,6 +144,22 @@ EOF
}
EOF
;;
+ efi)
+
+ EFIPATH=${DEVICE#*@}
+ DEVICE=${DEVICE%@*}
+ onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
+ cat << EOF
+menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-efi-$(grub_get_device_id "${DEVICE}")' {
+EOF
+ save_default_entry | sed -e "s/^/\t/"
+ prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
+
+ cat <<EOF
+ chainloader ${EFIPATH}
+}
+EOF
+ ;;
linux)
LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
prepare_boot_cache=