[CentOS] Mount USB disk at startup?

Thu Feb 11 23:38:39 UTC 2010
Jobst Schmalenbach <jobst at barrett.com.au>

Rather weird, could be that the delay is too long, it should be more like 10!

  http://codtech.com/wiki/index.php/CULT:_Kernel_command_line_parameters#rootdelay

I have had a similar problem ... on one server I use USB backup disks
which I swap on a regular base. On the occasion when I had to reboot
it halted with the fsck not being able to check it ... so I put
it in and nver looked back.


Jobst



On Thu, Feb 11, 2010 at 09:44:41AM +0100, Mogens Kjaer (mk at crc.dk) wrote:
> On 02/11/2010 01:26 AM, Jobst Schmalenbach wrote:
> >
> > There is a kernel option you can give to solve
> > this problem, in /boot/grub/grub.con add to the end
> > of the kernel line:
> >
> >   rootdelay Xs
> >
> > where x is the amounty of time to wait before
> > /root is mounted, however this is valid for
> > everything else as well.
> >
> > play with X until you get it right.
> 
> I've tried changing grub.conf into:
> 
> default=0
> timeout=5
> splashimage=(hd0,0)/grub/splash.xpm.gz
> hiddenmenu
> title CentOS (2.6.18-164.11.1.el5.centos.plus)
>          root (hd0,0)
>          kernel /vmlinuz-2.6.18-164.11.1.el5.centos.plus ro 
> rootdelay=200 root=LABEL=/
>          initrd /initrd-2.6.18-164.11.1.el5.centos.plus.img
> title CentOS (2.6.18-164.11.1.el5)
>          root (hd0,0)
>          kernel /vmlinuz-2.6.18-164.11.1.el5 ro rootdelay=200 root=LABEL=/
>          initrd /initrd-2.6.18-164.11.1.el5.img
> 
> but there's no delay at all (the "kernel" lines may have wrapped,
> they are on one line in the file).
> 
> The kernel source has:
> 
> static unsigned int __initdata root_delay;
> static int __init root_delay_setup(char *str)
> {
>          root_delay = simple_strtoul(str, NULL, 0);
>          return 1;
> }
> ...
> __setup("rootdelay=", root_delay_setup);
> 
> and later:
>          if (root_delay) {
>                  printk(KERN_INFO "Waiting %dsec before mounting root 
> device...\n",
>                         root_delay);
>                  ssleep(root_delay);
>          }
> 
> The message "Waiting 200sec before mounting root device..." is never
> printed.
> 
> Putting rootdelay= after root= makes no difference.
> 
> Strange...
> 
> Mogens
> 
> -- 
> Mogens Kjaer, Carlsberg A/S, Computer Department
> Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
> Phone: +45 33 27 53 25, Mobile: +45 22 12 53 25
> Email: mk at crc.dk Homepage: http://www.crc.dk
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos

-- 
People who fight may lose. People who do not fight have already lost.  - Bertolt Brecht

  | |0| |   Jobst Schmalenbach, jobst at barrett.com.au, General Manager
  | | |0|   Barrett Consulting Group P/L & The Meditation Room P/L
  |0|0|0|   +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia