From 33ecfe0ebbe719cd8dd2268b37dbb34f1ec8a237 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 12 Mar 2007 05:14:09 +0000 Subject: * Jan Peter den Heijer The attached patch places the $root check before killing udev. The point is this: It gives udev a chance to create the device. It also prints a message saying "if you see the device being created here, try passing rootdelay=8 or higher to the kernel" also some minor edits: - Use echo instead of message when dropping into the shell when $root isn't found. People will always want to see those message i guess... - fixed a little typo : "use d echo * " is now "use echo * " mkinitcpio-rev199-place-rootcheck-before-killing-udev.patch git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@200 880c04e9-e011-0410-abf7-b926e227c9cd --- init | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'init') diff --git a/init b/init index 97b7b88..b06a5d2 100644 --- a/init +++ b/init @@ -95,20 +95,17 @@ fi if [ "${break}" = "y" ]; then echo ":: Break requested, type 'exit' to resume operation" - echo " NOTE: klibc contains no 'ls' binary, used 'echo *' instead" + echo " NOTE: klibc contains no 'ls' binary, use 'echo *' instead" PS1="ramfs$ " /bin/sh -i fi -#Special handling if udev is running -udevpid=$(/bin/minips -C udevd -o pid=) -if [ "x${udevpid}" != "x" ]; then - /bin/kill -9 $udevpid - /bin/sleep 0.01 -fi - if [ ! -e "${root}" ]; then err "Unable to create/detect root device '${root}'" - msg "Dropping to a recovery shell... type 'exit' to reboot" + echo "Dropping to a recovery shell... type 'exit' to reboot" + echo "NOTE: klibc contains no 'ls' binary, use 'echo *' instead" + echo "" + echo "If the device '${root}' gets created while you are here," + echo "try adding 'rootdelay=8' or higher to the kernel command-line" PS1="ramfs$ " /bin/sh -i msg "Rebooting..." /bin/reboot @@ -119,6 +116,14 @@ else fi fi +#Special handling if udev is running +udevpid=$(/bin/minips -C udevd -o pid=) +if [ "x${udevpid}" != "x" ]; then + /bin/kill -9 $udevpid + /bin/sleep 0.01 +fi + + echo "/sbin/modprobe" > /proc/sys/kernel/modprobe exec /bin/kinit -- "root=${root}" ${kinit_params} "${runlevel}" > /dev/null 2>&1 -- cgit v1.2.3-24-g4f1b