Hi everyone, On Wed, Feb 22, 2006 at 09:57:38AM -0800, Linus Torvalds wrote: > > > I _think_ that in this particular case, the best particular choice might > be for the "mount" binary to be taught to re-try after a few seconds: > either with a command line argument, or with just the early bootup initrd > code being encouraged to have a loop like > > if (mounting root failed) > echo "Please press F1 to continue" > do > read-keyboard-with-5-second-timeout > while (mounting root failed) > endif > > so that the user would have to press a key (or we'd just re-try every five > seconds). > > That way, the boot wouldn't just fail immediately over something that can > be fixed (sometimes the root partition might just be hot-pluggable too: > "insert disk and continue" can be a valid way to handle issues). > Is there a way to tell the kernel about which is the root device other than through the kernel command line? If not, /init or /linuxrc could parse /proc/cmdline for that and wait for the device node to appear. Having the same trouble with my crude bloated glibc initramfs, I resorted to waiting for /dev/hdX to appear after ide module insertion in a loop with one second delay. AFAICS the loop is taken three times at most on my slowest box, so five seconds seems a bit much, IMHO. Trivial shell code goes like echo -n "Waiting for root device to appear" while [ ! -e $rootdevice ] do sleep 1s echo -n "." done echo " OK." The only downside here would be devices specified as hex numbers, and we have an endless loop in case something went wrong. The latter can be addressed with a counter checked against some sane limit. Worked fine for me every time, except once when I build an image without the IDE controller's module : / Chris
Attachment:
pgpW3rQVGReJN.pgp
Description: PGP signature
- References:
- Re: 2.6.16-rc4: known regressions
- From: Andrew Morton <[email protected]>
- Re: 2.6.16-rc4: known regressions
- From: Kay Sievers <[email protected]>
- Re: 2.6.16-rc4: known regressions
- From: Andrew Morton <[email protected]>
- Re: 2.6.16-rc4: known regressions
- From: Linus Torvalds <[email protected]>
- Re: 2.6.16-rc4: known regressions
- From: Linus Torvalds <[email protected]>
- Re: 2.6.16-rc4: known regressions
- From: "Theodore Ts'o" <[email protected]>
- Re: 2.6.16-rc4: known regressions
- From: Joel Becker <[email protected]>
- Re: 2.6.16-rc4: known regressions
- From: "Theodore Ts'o" <[email protected]>
- Re: 2.6.16-rc4: known regressions
- From: Gabor Gombas <[email protected]>
- Re: 2.6.16-rc4: known regressions
- From: Linus Torvalds <[email protected]>
- Re: 2.6.16-rc4: known regressions
- Prev by Date: Re: lsscsi-0.17 released
- Next by Date: Re: [PATCH 0/3] map multiple blocks in get_block() and mpage_readpages()
- Previous by thread: Re: 2.6.16-rc4: known regressions
- Next by thread: Re: 2.6.16-rc4: known regressions
- Index(es):