25 lines
1001 B
Diff
25 lines
1001 B
Diff
|
diff -up os-prober-1.53/os-prober.mdraidfix os-prober-1.53/os-prober
|
||
|
--- os-prober-1.53/os-prober.mdraidfix 2012-05-25 13:28:16.544374104 +0430
|
||
|
+++ os-prober-1.53/os-prober 2012-05-25 13:34:11.096941585 +0430
|
||
|
@@ -57,6 +57,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 |
|
||
|
@@ -113,7 +118,7 @@ grep "^/dev/" /proc/mounts | parse_proc_
|
||
|
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
|