lkml.org 
[lkml]   [2005]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Wait and retry mounting root device (revised)
    On Tue, Jan 18, 2005 at 02:54:24AM +0000, Daniel Drake wrote:

    > Retry up to 20 times if mounting the root device fails. This fixes booting
    > from usb-storage devices, which no longer make their partitions immediately
    > available.
    >
    > This should allow booting from root=/dev/sda1 and root=8:1 style
    > parameters, whilst not breaking booting from RAID or initrd :)
    > I have also cleaned up the mount_block_root() function a bit.

    + if (err == -EACCES && (flags | MS_RDONLY) == 0)
    + err = sys_mount(name, "/root", fs, flags | MS_RDONLY, data);
    +

    It is rather unlikely that (flags | MS_RDONLY) == 0 ...

    I don't like the 20 - so arbitrary.
    And since we are going to panic anyway, why not wait indefinitely?

    Suppose we have kernel command line options
    rootdev=, rootpttype=, root=, rootfstype=, rootwait=
    telling the kernel what device is the root device,
    what type of partition table it has,
    on which partition the root filesystem lives,
    what type of filesystem it has,
    and whether we want to wait until it becomes available instead of panicking.

    If we wait, possibly after the first failure to mount, do a printk
    to tell the user: waiting for device to become available.

    rootwait can have several values: for example, with a boot/root floppy combo,
    we want the user to hit enter or so before accessing the device.

    Andries
    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:09    [W:3.797 / U:0.372 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site