Re: waiting 10s before mounting root filesystem?

From: William Park (opengeometry_at_yahoo.ca)
Date: 12/31/04

  • Next message: Jim Nelson: "Re: printk loglevel policy?"
    Date:	Thu, 30 Dec 2004 22:58:34 -0500
    To: Jesper Juhl <juhl-lkml@dif.dk>
    
    

    On Fri, Dec 31, 2004 at 02:45:53AM +0100, Jesper Juhl wrote:
    > William Park wrote:
    > > On Thu, Dec 30, 2004 at 01:25:32PM -0200, Marcelo Tosatti wrote:
    > > > On Tue, Dec 28, 2004 at 07:59:22PM -0500, William Park wrote:
    > > > > On Mon, Dec 27, 2004 at 10:23:34PM +0100, Andreas Unterkircher wrote:
    > > > > > [1] http://www.xenotime.net/linux/usb/usbboot-2422.patch
    ...
    > > http://linux.bkbits.net:8080/linux-2.4/patch@1.1527.1.20?nav=index.html|ChangeSet@-3w|cset@1.1527.1.20
    > >
    > > Hi Marcelo,
    > >
    > > 1. Actually, my patch above loops every 5s to reduce screen clutter,
    > > whereas the original 2.4 patch (cited by Andreas Unterkircher) loops
    > > every 1s. Both loops forever.
    > >
    > > But, if a limit of 10 tries is what you want, then here is a patch
    > > for 2.6.10:
    >
    > I agree with you that reducing screen clutter is a good thing. How
    > about something like this that waits for 10+ seconds so even slow
    > devices have a chance to get up but also does some primitive
    > ratelimiting on the messages by only printing one every 3 seconds (but
    > still attempting to mount every 1 sec) ?

    Hi Jesper,

    I prefer countdown with short message. The 2.4 messages are too long.
    Incorporating your use of ssleep() and printk() loglevel, here is
    the latest iteration:

    --- ./init/do_mounts.c--orig 2004-12-27 17:36:35.000000000 -0500
    +++ ./init/do_mounts.c 2004-12-30 22:43:57.000000000 -0500
    @@ -6,6 +6,7 @@
     #include <linux/suspend.h>
     #include <linux/root_dev.h>
     #include <linux/security.h>
    +#include <linux/delay.h>
     
     #include <linux/nfs_fs.h>
     #include <linux/nfs_fs_sb.h>
    @@ -278,6 +279,7 @@
             char *fs_names = __getname();
             char *p;
             char b[BDEVNAME_SIZE];
    + int tryagain = 20;
     
             get_fs_names(fs_names);
     retry:
    @@ -297,9 +299,13 @@
                      * and bad superblock on root device.
                      */
                     __bdevname(ROOT_DEV, b);
    - 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");
     
                     panic("VFS: Unable to mount root fs on %s", b);
             }
    -
    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: Jim Nelson: "Re: printk loglevel policy?"

    Relevant Pages

    • Re: patch for 2.4.22 sbp2 hang when loaded with devices already connected
      ... > `initializing' state if it was loaded when firewire devices were ... > This patch fixes it. ... Please let me send the patch to Marcelo. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: oom killer in 2.4.23
      ... >> Marcelo asked me to to make it configurable at runtime so you could go ... I'm see'ing similar except it's killing random apps such as CRON, ... How far do I have to roll back to get the previous oomkiller? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: BK-kernel-tools/shortlog update
      ... > Marcelo releases a kernel (Linus seems to care, ... I'd love to somebody to do a shortlog of the entire 2.5.x kernel ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: waiting 10s before mounting root filesystem?
      ... William Park wrote: ... This is a small variation on the patch I posted a little while ago. ... Sorry if I messed up the thread a bit, but I had some mailserver trouble and lost a few LKML mails so I couldn't reply directly to the proper mail. ... 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/ ...
      (Linux-Kernel)
    • RE: [PATCH] 2.4.22-pre7 : ACPI poweroff fix
      ... Marcelo, ... or ask Andrew for some feedback. ... >> for poweroff. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)