--- cryptroot.ORIGINAL 2015-11-28 17:00:15.538155116 +0100 +++ cryptroot.FIXED_FINAL 2015-11-28 21:04:18.219178031 +0100 @@ -336,6 +336,29 @@ echo "ROOT=$NEWROOT" >>/conf/param.conf fi fi + + if [ ! -e "$NEWROOT" ]; then + count_wait=0 + message "Waiting for $NEWROOT to appear..." + while true ; do + /bin/sleep 0.2 + count_wait=$(( ${count_wait} + 1 )) + + if [ -e "$NEWROOT" ]; then + message "$NEWROOT found." + unset count_wait + break + fi + + # Waiting for max 30 seconds (30 seconds / 0.2 = 150 rounds) + if [ $myCount -gt 150 ]; then + message "$NEWROOT not found, giving up :-(" + unset count_wait + break + fi + done + fi + #eval $(fstype < "$NEWROOT") FSTYPE="$(/sbin/blkid -s TYPE -o value "$NEWROOT")" fi