From ba0a7ea0789375cdcefac482742399b155622222 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 3 Jun 2013 20:04:19 +0200 Subject: [PATCH] linuxrc: call udevadm settle after modules_load udev may still be processing rules and this can cause very bad things. For instance, modules_load may have loaded an usb host controller driver and we must wait for the udev rules to terminate. However, this may lead to other race conditions, but we have observed that adding scandelay=n where n >= 5 actually fixes the issue of booting off USB under certain scenarios. --- defaults/linuxrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/defaults/linuxrc b/defaults/linuxrc index 0fc60ae..e3629b2 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -359,15 +359,19 @@ else good_msg 'Skipping module load; no modules in the ramdisk!' fi +# Give udev time to execute all the rules. This may be beneficial +# for usb-storage devices. +is_udev && udevadm settle + +# Apply scan delay if specified +sdelay + # If we're mdev, we better wait for all the modules to be loaded. if is_mdev then splashcmd init fi -# Apply scan delay if specified -sdelay - cd / # Start iSCSI