Re: waiting 10s before mounting root filesystem?

From: Paulo Marques (pmarques_at_grupopie.com)
Date: 12/31/04

  • Next message: Richard Purdie: "Flaw in ide_unregister()"
    Date:	Fri, 31 Dec 2004 12:04:25 +0000
    To: Andrew Morton <akpm@osdl.org>
    
    

    Andrew Morton wrote:
    > Paulo Marques <pmarques@grupopie.com> wrote:
    >
    >>Andrew Morton wrote:
    >>
    >>>William Park <opengeometry@yahoo.ca> wrote:
    >>>
    >>>
    >>>>- printk("VFS: Cannot open root device \"%s\" or %s\n",
    >>>>- root_device_name, b);
    >>>>- printk("Please append a correct \"root=\" boot option\n");
    >>>>+ if (--tryagain) {
    >>>>+ printk (KERN_WARNING "VFS: Waiting %dsec for root device...\n", tryagain);
    >>>>+ ssleep (1);
    >>>>+ goto retry;
    >>>>+ }
    >>>>+ printk (KERN_CRIT "VFS: Cannot open root device \"%s\" or %s\n", root_device_name, b);
    >>>>+ printk (KERN_CRIT "Please append a correct \"root=\" boot option\n");
    >>>
    >>>
    >>>Why is this patch needed? If it is to offer the user a chance to insert
    >>>the correct medium or to connect the correct device, why not rely upon the
    >>>user doing that thing and then hitting reset?
    >>
    >>No, no. The problem is not user interaction.
    >>
    >>The problem is that the USB subsystem takes a lot of time to go through
    >>the hostcontrollers -> hubs -> devices. By the time it finds the USB
    >>mass storage that is supposed to be used as root filesystem, the kernel
    >>had already panic'ed.
    >
    >
    > That would be a USB bug, surely. If /dev/usb/foo is present and
    > functioning correctly, and higher-level code tries to access that device,
    > USB should _not_ error out - it should block the caller until everything is
    > sorted out.

    The problem is that, if you use udev (or iack, iack, cough, cough,
    devfs), the device node is not yet present at the time the kernel tries
    to mount it, although the hardware is physically there. This is because
    the USB subsystem is busy going through all the USB tree, enumerating /
    reseting devices, powering hubs, etc.

    I really don't know enough about the internal details, but it seems that
    the USB startup sequence is asynchronous with respect to the rest of the
    boot sequence. This is usually allright (I really don't want the
    detection of my USB scanner to hold back my boot), but in the special
    case where the root filesystem is in a USB mass storage device, it poses
    a real problem.

    Maybe someone like Grek Kroah, Alan Stern, etc., can shed some more
    light on this matter.

    -- 
    Paulo Marques - www.grupopie.com
    "A journey of a thousand miles begins with a single step."
    Lao-tzu, The Way of Lao-tzu
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Richard Purdie: "Flaw in ide_unregister()"

    Relevant Pages

    • Re: USB mass storage
      ... "How to switch default usb client function driver on wince 5.0 at ... then later disable mass storage and then enable activesync? ... added the USBF mass storage, which causes your device to show up as a USB ... I tried changing the registry entries as shown below. ...
      (microsoft.public.windowsce.platbuilder)
    • Re: Need Help: CE5.0 flash is not shown as USB mass storage device
      ... Even though i made the usb mass storage function ... driver usbmsfn.dll as the default client driver, ... USB active sync works fine without any problem. ...
      (microsoft.public.windowsce.platbuilder)
    • Re: USB Drivers Update? QFX?
      ... Is it any way to use USB Mass Storage function under ... I want to connect my device to PC host ... function driver + USB Function POD Transport driver + ...
      (microsoft.public.windowsce.platbuilder)
    • Re: USB Mass Storage Device ( Not able to open the drive)
      ... What happens when you remove the SD card from SD sloat when the USB ... In my case I am not able to see any change on host, ... My USB Mass Storage Device driver is working. ...
      (microsoft.public.windowsce.platbuilder)
    • Re: usb broken in 2.6.5-rc1?
      ... but this happens when I connect my USB 2.0 mass storage ... Care to send this to the linux-usb-devel mailing list where it will ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)