summaryrefslogtreecommitdiff
path: root/packages/slugos-init/files/boot/disk
diff options
context:
space:
mode:
Diffstat (limited to 'packages/slugos-init/files/boot/disk')
-rw-r--r--packages/slugos-init/files/boot/disk14
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/slugos-init/files/boot/disk b/packages/slugos-init/files/boot/disk
index 63370ce340..34c002ba0b 100644
--- a/packages/slugos-init/files/boot/disk
+++ b/packages/slugos-init/files/boot/disk
@@ -24,9 +24,21 @@ then
# waiting for disk
if test "$sleep" -gt 0
then
- echo "Waiting $sleep seconds for disk"
+ echo "boot: waiting $sleep seconds for disk"
sleep "$sleep"
fi
+ # Attempt to assemble the RAID if necessary
+ if (echo $device | grep -q "^/dev/md")
+ then
+ if test -n "$MDUUID"
+ then
+ echo "boot: assembling RAID array (UUID)"
+ mdadm -Acpartitions --auto=md --uuid="$MDUUID" $device
+ else
+ echo "boot: assembling RAID array (config file)"
+ mdadm -As --auto=md $device
+ fi
+ fi
#
# fire the boot
echo "boot: rootfs: mount $* $device [$UUID]"