diff --git a/setup.sh b/setup.sh index 977da70..c67bdf3 100644 --- a/setup.sh +++ b/setup.sh @@ -139,7 +139,7 @@ for disk in `echo "$boots"`; do pending="0" while ! [ -e "/dev/disk/by-id/${disk}-part3" ]; do partprobe 2>/dev/null 1>/dev/null - if [ "$pending" = "0" ]; then echo "" && echo "Waiting for ${disk} partition 3 to update..."; pending="1"; fi + if [ "$pending" = "0" ]; then echo "" && echo "Waiting for ${disk} boot partition to update..."; pending="1"; fi sleep 3 done if [ "$pending" = "1" ]; then echo "Done."; fi @@ -163,6 +163,17 @@ else raidtype=" $raidtype" fi +# wait for the partitions to show up +for disk in `echo "$disks"`; do + pending="0" + while ! [ -e "/dev/disk/by-id/${disk}-part4" ]; do + partprobe 2>/dev/null 1>/dev/null + if [ "$pending" = "0" ]; then echo "" && echo "Waiting for ${disk} storage partition to update..."; pending="1"; fi + sleep 3 + done + if [ "$pending" = "1" ]; then echo "Done."; fi +done + echo "" echo "Creating main zpool..." error=`zpool create -f -o ashift=12 -O acltype=posixacl -O canmount=off -O compression=lz4 -O dnodesize=auto -O normalization=formD -O relatime=on -O xattr=sa -O mountpoint=/ -R /mnt rpool${raidtype}${rootraidz} 2>&1 1>/dev/null`