From e23a08d0c97a0cc415aaa165da840b056f93c997 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 8 Oct 2021 23:06:07 +0100 Subject: gentoo resync : 08.10.2021 --- .../files/os-prober-1.79-mdraid-detection.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch (limited to 'sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch') diff --git a/sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch b/sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch new file mode 100644 index 000000000000..15b9de5117a9 --- /dev/null +++ b/sys-boot/os-prober/files/os-prober-1.79-mdraid-detection.patch @@ -0,0 +1,28 @@ +Fixes OS detection on mdraid devices + +Bug: https://bugs.debian.org/648251 + https://bugzilla.redhat.com/752402 + +--- a/os-prober ++++ b/os-prober +@@ -64,6 +64,11 @@ partitions () { + exit 0 + fi + ++ # Add MD RAID devices ++ if [ -f /proc/mdstat ] ; then ++ awk '/^md/ {printf "/dev/"$1"\n"}' /proc/mdstat ++ fi ++ + # Also detect OSes on LVM volumes (assumes LVM is active) + if type lvs >/dev/null 2>&1; then + echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name | +@@ -123,7 +128,7 @@ if [ -f /proc/swaps ]; then + fi + : >"$OS_PROBER_TMP/raided-map" + if [ -f /proc/mdstat ] ; then +- grep "^md" /proc/mdstat | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true ++ grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true + fi + + for partition in $(partitions); do -- cgit v1.2.3