grub2/30_os-prober_UEFI_support.patch
Stephan Kulow bf6336238a Accepting request 147213 from Base:System
- add support for chainloading another UEFI bootloader to
  30_os-prober (bnc#775610) (forwarded request 147192 from arvidjaar)

OBS-URL: https://build.opensuse.org/request/show/147213
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=53
2013-01-07 14:17:20 +00:00

37 lines
1.1 KiB
Diff

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=