forked from pool/os-prober
Marcus Meissner
81111d8d75
- add support for chainloading another UEFI bootloader (bnc#775610) * 05efi - top level driver to search ESP * efi-20microsoft - support Microsoft UEFI bootloader * efi-10elilo - support ELILO UEFI bootloader (Agnelo de la Crotche) - skip legacy Microsoft bootloader on UEFI (bnc#775610) OBS-URL: https://build.opensuse.org/request/show/147193 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=9
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
From: Andrey Borzenkov <arvidjaar@gmail.com>
|
|
Date: Fri Jan 4 09:46:56 UTC 2013
|
|
Subject: skip legacy Microsoft bootloader on UEFI system
|
|
|
|
References: bnc#775610
|
|
Patch-Mainline: no
|
|
|
|
Sometimes Windows installs both legacy BIOS and UEFI bootloaders.
|
|
Attempt to chainload legacy bootloader on UEFI system fails. Skip
|
|
adding legacy bootloader in this case.
|
|
|
|
TODO: this probably should be implemented as runtime check. But it
|
|
does the right thing in majority of cases. If mixed legacy/UEFI
|
|
boot will be used frequently, it can be revisited.
|
|
Index: os-prober/os-probes/mounted/x86/20microsoft
|
|
===================================================================
|
|
--- os-prober.orig/os-probes/mounted/x86/20microsoft
|
|
+++ os-prober/os-probes/mounted/x86/20microsoft
|
|
@@ -7,6 +7,12 @@ partition="$1"
|
|
mpoint="$2"
|
|
type="$3"
|
|
|
|
+# This script looks for legacy BIOS bootloaders only. Skip if running UEFI
|
|
+if [ -d /sys/firmware/efi ]; then
|
|
+ debug "Skipping legacy bootloaders on UEFI system"
|
|
+ exit 1
|
|
+fi
|
|
+
|
|
# Weed out stuff that doesn't apply to us
|
|
case "$type" in
|
|
ntfs|ntfs-3g) debug "$1 is a NTFS partition" ;;
|