e96960f1de
- add grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch (bnc#810912) * use linuxefi in 30_os-prober if secure boot is enabled (forwarded request 162967 from arvidjaar) OBS-URL: https://build.opensuse.org/request/show/162973 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=66
55 lines
1.6 KiB
Diff
55 lines
1.6 KiB
Diff
From: Andrey Borzenkov <arvidjaar@gmail.com>
|
|
Subject: use linuxefi/initrdefi for Linux in 30_os-prober if secure boot is enabled
|
|
Reference: bnc#810912
|
|
|
|
Emit linuxefi/initrdefi for os-prober detected Linux installations if
|
|
secure boot is enabled.
|
|
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
|
|
@@ -41,6 +41,15 @@ if [ -z "${OSPROBED}" ] ; then
|
|
exit 0
|
|
fi
|
|
|
|
+# If secure boot is enabled, use linuxefi/initrdefi for Linux (bnc#810912)
|
|
+if [ -d /sys/firmware/efi ] && [ "x${GRUB_USE_LINUXEFI}" = "xtrue" ]; then
|
|
+ LINUX_LOADER_CMD=linuxefi
|
|
+ LINUX_INITRD_CMD=initrdefi
|
|
+else
|
|
+ LINUX_LOADER_CMD=linux
|
|
+ LINUX_INITRD_CMD=initrd
|
|
+fi
|
|
+
|
|
osx_entry() {
|
|
if [ x$2 = x32 ]; then
|
|
# TRANSLATORS: it refers to kernel architecture (32-bit)
|
|
@@ -207,11 +216,11 @@ EOF
|
|
save_default_entry | sed -e "s/^/\t/"
|
|
printf '%s\n' "${prepare_boot_cache}"
|
|
cat << EOF
|
|
- linux ${LKERNEL} ${LPARAMS}
|
|
+ ${LINUX_LOADER_CMD} ${LKERNEL} ${LPARAMS}
|
|
EOF
|
|
if [ -n "${LINITRD}" ] ; then
|
|
cat << EOF
|
|
- initrd ${LINITRD}
|
|
+ ${LINUX_INITRD_CMD} ${LINITRD}
|
|
EOF
|
|
fi
|
|
cat << EOF
|
|
@@ -227,11 +236,11 @@ EOF
|
|
save_default_entry | sed -e "s/^/\t\t/"
|
|
printf '%s\n' "${prepare_boot_cache}" | sed -e "s/^/\t/"
|
|
cat << EOF
|
|
- linux ${LKERNEL} ${LPARAMS}
|
|
+ ${LINUX_LOADER_CMD} ${LKERNEL} ${LPARAMS}
|
|
EOF
|
|
if [ -n "${LINITRD}" ] ; then
|
|
cat << EOF
|
|
- initrd ${LINITRD}
|
|
+ ${LINUX_INITRD_CMD} ${LINITRD}
|
|
EOF
|
|
fi
|
|
cat << EOF
|