From owner-freebsd-arch@FreeBSD.ORG Tue Sep 28 18:24:49 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BD341065674 for ; Tue, 28 Sep 2010 18:24:49 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout030.mac.com (asmtpout030.mac.com [17.148.16.105]) by mx1.freebsd.org (Postfix) with ESMTP id 822788FC12 for ; Tue, 28 Sep 2010 18:24:49 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp030.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0L9G00L3NZ55IW70@asmtp030.mac.com> for freebsd-arch@freebsd.org; Tue, 28 Sep 2010 11:24:43 -0700 (PDT) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1004200000 definitions=main-1009280125 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.0.10011,1.0.148,0.0.0000 definitions=2010-09-28_11:2010-09-28, 2010-09-28, 1970-01-01 signatures=0 From: Marcel Moolenaar In-reply-to: <20100928.112701.539398516089932776.imp@bsdimp.com> Date: Tue, 28 Sep 2010 11:24:41 -0700 Message-id: <4E910770-812B-4F04-B026-E3DB5EDEE000@mac.com> References: <20100928.112701.539398516089932776.imp@bsdimp.com> To: "M. Warner Losh" X-Mailer: Apple Mail (2.1081) Cc: freebsd-arch@freebsd.org Subject: Re: [patch] functional prototype of root mount enhancement X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2010 18:24:49 -0000 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