summarylogtreecommitdiffstats
path: root/os-prober-probe-MD-devices.patch
blob: 28a5dc355713d2fdca36a5c2f1bc5a09e0936d45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Index: os-prober-1.61/os-prober
===================================================================
--- os-prober-1.61.orig/os-prober
+++ os-prober-1.61/os-prober
@@ -39,6 +39,11 @@ partitions () {
 			fi
 		done

+		# Add Linux MD unpartioned devices. Linux MD partitions are already covered above
+		[ -f /proc/mdstat ] && grep '^md' /proc/mdstat | while read md line; do
+			[ -e "/dev/$md" ] && echo "/dev/$md"
+		done
+
 		# Add Serial ATA RAID devices
 		if type dmraid >/dev/null 2>&1 && \
 		   dmraid -s -c >/dev/null 2>&1; then
@@ -79,7 +84,8 @@ parse_proc_mdstat () {
 			udevadm info "$@"
 		}
 	fi
-	while read line; do
+	# Only add MD slaves to the list
+	while read md line; do
 		for word in $line; do
 			dev="${word%%\[*}"
 			# TODO: factor this out to something in di-utils if