[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#648251: A patch to add support for distributions installed on MD Raid devices



Package: os-prober

Version: 1.48


This bug is about the bug reported in [1] and the provided patch. This patch is expected to provide support for distributions installed on mdraid devices. Please review the patch and apply if appropriate.


Thanks

[1] https://bugzilla.redhat.com/show_bug.cgi?id=752402


--- /usr/bin/os-prober.orig	2011-07-25 13:31:46.000000000 +0200
+++ /usr/bin/os-prober.orig	2011-11-09 19:29:56.912934474 +0100
@@ -57,6 +57,11 @@ 
 		exit 0
 	fi
 
+   # Add MD RAID devices
+   if [ -f /proc/mdstat ] ; then
+      grep "^md" /proc/mdstat | awk '{printf "/dev/"$1"\n"}'
+   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 |
@@ -113,7 +118,7 @@ 
 grep "^/dev/" /proc/swaps | parse_proc_swaps >"$OS_PROBER_TMP/swaps-map" || true
 : >"$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

Reply to: