--- casper.orig 2008-10-21 11:23:00.590478209 +0100 +++ casper 2008-10-21 10:47:20.653906679 +0100 @@ -383,14 +383,21 @@ # Looking for "${root_persistence}" device or file if [ -n "${PERSISTENT}" ]; then - cowprobe=$(find_cow_device "${root_persistence}") - if [ -b "${cowprobe}" ]; then - cowdevice=${cowprobe} - cow_fstype=$(get_fstype "${cowprobe}") - cow_mountopt="rw,noatime" - else - [ "$quiet" != "y" ] && log_warning_msg "Unable to find the persistent medium" - fi + modprobe usb-storage + cow_tries=0 + while [ $cow_tries -lt 5 ]; do + cowprobe=$(find_cow_device "${root_persistence}") + if [ -b "${cowprobe}" ]; then + cowdevice=${cowprobe} + cow_fstype=$(get_fstype "${cowprobe}") + cow_mountopt="rw,noatime" + break + fi + [ "$quiet" != "y" ] && log_warning_msg "Unable to find the persistent medium - trying again in 5 seconds" + sleep 5 + cow_tries=`expr $cow_tries + 1` + done + [ "$quiet" != "y" -a "$cowdevice" = "tmpfs" ] && log_warning_msg "Giving up finding persistent medium" fi mount -t ${cow_fstype} -o ${cow_mountopt} ${cowdevice} /cow || panic "Can not mount $cowdevice on /cow" t