summaryrefslogtreecommitdiff
path: root/sys-boot/os-prober/files/os-prober-accept-ESP-on-IMSM.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-28 00:37:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-28 00:37:32 +0000
commit3f81fd7097ec931ebf6d862622e6d81834483dbb (patch)
treee8381bb314f59122a26bd714f1a14993a31ab8ee /sys-boot/os-prober/files/os-prober-accept-ESP-on-IMSM.patch
parent351bdb27fc041435144b39e022d9830c140ebd3a (diff)
sys-boot/os-prober : shamelessly take all the patches from openSUSE Factory to make it work
Diffstat (limited to 'sys-boot/os-prober/files/os-prober-accept-ESP-on-IMSM.patch')
-rw-r--r--sys-boot/os-prober/files/os-prober-accept-ESP-on-IMSM.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/sys-boot/os-prober/files/os-prober-accept-ESP-on-IMSM.patch b/sys-boot/os-prober/files/os-prober-accept-ESP-on-IMSM.patch
new file mode 100644
index 00000000..bacf2065
--- /dev/null
+++ b/sys-boot/os-prober/files/os-prober-accept-ESP-on-IMSM.patch
@@ -0,0 +1,33 @@
+Index: os-prober-1.76/os-probes/mounted/x86/05efi
+===================================================================
+--- os-prober-1.76.orig/os-probes/mounted/x86/05efi
++++ os-prober-1.76/os-probes/mounted/x86/05efi
+@@ -28,13 +28,24 @@ if type udevadm > /dev/null 2>&1; then
+ fi
+
+ if type udevinfo > /dev/null 2>&1; then
+- # Skip virtual devices
++ eval "$(udevinfo -q property -n "$partition" | grep -E '^(MD_CONTAINER|ID_PART_ENTRY_(TYPE|SCHEME))=')"
++ debug "$partition container is '$MD_CONTAINER'"
++
++ # Skip virtual devices unless they are known SW-RAID
+ if udevinfo -q path -n $partition | grep -q /virtual/; then
+- debug "$1 is virtual device: exiting"
+- exit 1
++ # Check for Intel Matrix array
++ if [ -n "$MD_CONTAINER" ]; then
++ eval "$(udevinfo -q property -n "$MD_CONTAINER" | grep -E '^MD_METADATA=')"
++ debug "$MD_CONTAINER metadata is '$MD_METADATA'"
++ fi
++ if [ "$MD_METADATA" = imsm ]; then
++ debug "$partition is on IMSM array"
++ else
++ debug "$1 is virtual device: exiting"
++ exit 1
++ fi
+ fi
+
+- eval "$(udevinfo -q property -n "$partition" | grep -E '^ID_PART_ENTRY_(TYPE|SCHEME)=')"
+ debug "$partition partition scheme is $ID_PART_ENTRY_SCHEME"
+ debug "$partition partition type is $ID_PART_ENTRY_TYPE"
+