os-prober-mdraidfix.patch 849 B

1234567891011121314151617181920212223242526
  1. Index: os-prober/os-prober
  2. ===================================================================
  3. --- os-prober.orig/os-prober
  4. +++ os-prober/os-prober
  5. @@ -64,6 +64,11 @@ partitions () {
  6. exit 0
  7. fi
  8. + # Add MD RAID devices
  9. + if [ -f /proc/mdstat ] ; then
  10. + awk '/^md/ {printf "/dev/"$1"\n"}' /proc/mdstat
  11. + fi
  12. +
  13. # Also detect OSes on LVM volumes (assumes LVM is active)
  14. if type lvs >/dev/null 2>&1; then
  15. echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name |
  16. @@ -123,7 +128,7 @@ if [ -f /proc/swaps ]; then
  17. fi
  18. : >"$OS_PROBER_TMP/raided-map"
  19. if [ -f /proc/mdstat ] ; then
  20. - grep "^md" /proc/mdstat | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
  21. + grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
  22. fi
  23. for partition in $(partitions); do