Re: 2.6.16-rc4: known regressions
From: Christian Trefzer
Date: Wed Feb 22 2006 - 13:35:17 EST
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:
pgp00000.pgp
Description: PGP signature