Author: alexander
Date: 2007-06-10 06:34:18 -0600 (Sun, 10 Jun 2007)
New Revision: 1912

Modified:
   trunk/packages/initramfs/init.in
Log:
Retry finding the LiveCD device a few times

Modified: trunk/packages/initramfs/init.in
===================================================================
--- trunk/packages/initramfs/init.in    2007-06-10 12:10:55 UTC (rev 1911)
+++ trunk/packages/initramfs/init.in    2007-06-10 12:34:18 UTC (rev 1912)
@@ -81,14 +81,32 @@
 }
 
 do_mount_cd() {
+       i=1
        while [ ! -L /dev/lfs-cd ] ; do
                find_cd
+
                if [ ! -L /dev/lfs-cd ] ; then
+                       echo "LFS LiveCD not found."
+                       TRIES=5
+                       DELAY=6    # 30 seconds total
+
+                       for (( ; i<=$TRIES ; i++ )) ; do
+                               [ -L /dev/lfs-cd ] && break
+
+                               echo -n "Retry attempt $i of $TRIES... "
+                               sleep $DELAY
+                               find_cd
+
+                               [ -L /dev/lfs-cd ] && echo "success!" || echo 
"failed!"
+                       done
+               fi
+
+               if [ ! -L /dev/lfs-cd ] ; then
                        echo ""
                        echo "LFS LiveCD could not find its device, perhaps due 
to"
                        echo "unsupported or undetected hardware. Or maybe this 
is"
-                       echo "just a slow SCSI or USB controller that needs 
some time"
-                       echo "to settle (workaround: add rootdelay=10 to the 
kernel"
+                       echo "just a slow SCSI or USB controller that needs 
more time"
+                       echo "to settle (workaround: add rootdelay=30 to the 
kernel"
                        echo "command line in the boot loader)."
                        echo ""
                        echo "Dropping you to a shell."

-- 
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to