Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 2010 11:24:41 -0700
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: [patch] functional prototype of root mount enhancement
Message-ID:  <4E910770-812B-4F04-B026-E3DB5EDEE000@mac.com>
In-Reply-To: <20100928.112701.539398516089932776.imp@bsdimp.com>
References:  <CD1BDE8F-29BE-4A82-B0D9-8849FF3C1A1F@mac.com> <20100928.112701.539398516089932776.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sep 28, 2010, at 10:27 AM, M. Warner Losh wrote:

> Hey Marcel,
> 
> haven't had a chance to look through this in detail yet.  One item
> that has always bugged me is why when we hit the prompt that has to be
> the end of discovery...  Why can't we have a method to listen to new
> geom providers being advertised and then 'short circuit' the ask
> prompt if /dev/da0s1a or /dev/ufs/rootfs or whatever it originally
> wanted appears.
> 
> Maybe this isn't .ask, but some other verb in your language?

Hmmm... I think we should give .ask an option so that it can be
made conditional upon a key press then. I don't think it's nice
to print all that stuff, present a prompt, wait for input and
then shortly after continue booting anyway because some device
showed up.

Say we have ".ask on-key-press", which basically nullifies the
.ask directive (by implicitly failing to mount) unless a key was
pressed. At that time we actually print the help, show a prompt
and wait for input. This in combination with ".onfail retry"
allows us to cycle through the alternatives until 1) a key was
pressed and we'll drop at the interactive mount prompt or 2) a
device we've been waiting for appears and we can mount root.

Would that address your case?

Another feature we may need is the alternative: if you boot
with -C, we'll try cd9660:/dev/cd0 and cd9660:/dev/acd0. What
we really want to do is:
	.select /dev/cd0 /dev/acd0
	cd9660:%selected%

...

-- 
Marcel Moolenaar
xcllnt@mac.com






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E910770-812B-4F04-B026-E3DB5EDEE000>