summaryrefslogtreecommitdiff
path: root/debian/mdadm.config
diff options
context:
space:
mode:
authormadduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464>2006-08-02 15:20:03 +0000
committermadduck <madduck@3cfab66f-1918-0410-86b3-c06b76f9a464>2006-08-02 15:20:03 +0000
commit81a35bb8b3ac61c6ac98322b92e50913ec2d6cf4 (patch)
tree7060d03d010a82eb54c482eae399a3dadb31ec85 /debian/mdadm.config
parentf88d195cc5f8db742a5e619c35d1dff3406f8477 (diff)
* Add safety net to prevent endless loops in RAID autodetection. Now just
falls back to starting all arrays from the initramfs if it fails to determine an acceptable array for the / filesystem in three tries (see #381007).
Diffstat (limited to 'debian/mdadm.config')
-rw-r--r--debian/mdadm.config9
1 files changed, 9 insertions, 0 deletions
diff --git a/debian/mdadm.config b/debian/mdadm.config
index 0579d6da..0d61dcaa 100644
--- a/debian/mdadm.config
+++ b/debian/mdadm.config
@@ -64,6 +64,7 @@ fi
[ -n "$INITRDSTART" ] && db_set mdadm/initrdstart "$INITRDSTART"
+cnt=0
while true; do
db_input low mdadm/initrdstart || true
db_go
@@ -110,6 +111,14 @@ while true; do
# exit the while true loop
break
fi
+
+ cnt=$((cnt + 1))
+ if [ $cnt -eq 3 ]; then
+ echo "W: unable to determine RAID arrays needed for boot." >&2
+ echo "W: falling back to starting all of them..." >&2
+ INITRDSTART=all
+ break
+ fi
;;
esac
done