From: Harald Hoyer Date: Thu, 5 Mar 2009 13:21:59 +0000 (+0100) Subject: kill udev before switch_root and bail out after 10 seconds of mount tries X-Git-Tag: 0.1~369 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=879305557c5c9ca0f453aa273f09521833812dc1;p=thirdparty%2Fdracut.git kill udev before switch_root and bail out after 10 seconds of mount tries --- diff --git a/modules.d/99base/init b/modules.d/99base/init index 74b3368cc..1d28cb0eb 100755 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@ -64,6 +64,7 @@ source_all pre-mount getarg 'break=mount' && emergency_shell # mount scripts actually try to mount the root filesystem, and may # be sourced any number of times. As soon as one suceeds, no more are sourced. +i=0 while :; do for f in /mount/*.sh; do [ -x "$f" ] && . "$f"; @@ -71,6 +72,8 @@ while :; do done [ "$ROOTFS_MOUNTED" ] && break; sleep 1 + i=$[$i+1] + [ $i -gt 10 ] && emergency_shell done # by the time we get here, the root filesystem should be mounted. @@ -88,6 +91,7 @@ done getarg 'break=pre-pivot' && emergency_shell source_all pre-pivot getarg break && emergency_shell +kill $(pidof udevd) echo "Switching to real root filesystem $root" exec switch_root "$NEWROOT" "$INIT" $CMDLINE || { # davej doesn't like initrd bugs