From owner-freebsd-current@FreeBSD.ORG Fri Nov 6 16:41:56 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A0C1106566B; Fri, 6 Nov 2009 16:41:56 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from mail2.sandvine.com (Mail1.sandvine.com [64.7.137.134]) by mx1.freebsd.org (Postfix) with ESMTP id 410F38FC21; Fri, 6 Nov 2009 16:41:55 +0000 (UTC) Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by mail2.sandvine.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 6 Nov 2009 11:29:52 -0500 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 10332) id BE2D011652; Fri, 6 Nov 2009 11:29:51 -0500 (EST) Date: Fri, 6 Nov 2009 11:29:51 -0500 From: Ed Maste To: John Baldwin Message-ID: <20091106162951.GA77255@sandvine.com> References: <3bbf2fe10911060712y46684f76sefe195a62083c15@mail.gmail.com> <200911061050.50873.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200911061050.50873.jhb@freebsd.org> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 06 Nov 2009 16:29:52.0233 (UTC) FILETIME=[5DD38D90:01CA5EFE] Cc: Attilio Rao , freebsd-current@freebsd.org Subject: Re: [PATCH] Boot-time entering prompt by typing "123" sequence rather than any button X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2009 16:41:56 -0000 On Fri, Nov 06, 2009 at 10:50:50AM -0500, John Baldwin wrote: > On Friday 06 November 2009 10:12:59 am Attilio Rao wrote: > > This patch adds the possibility to enter the prompt at boot time by > > typing the sequence of buttons "123" rather than a single button: > > http://www.freebsd.org/~attilio/Sandvine/STABLE_8/boot123/boot123.diff > > > > This is useful in the cases where a serial console is likely going to > > be used which can carry on spourious character, leding to the prompt > > erroneously. > > This option is wrappered into the BOOT_PROMPT_123 option, in order to > > maintain the current POLA. > > This patch has been contributed back by Sandvine Incorporated. > > Please review. > > This seems a bit hackish, but the patch is fine on technical grounds. On > machines where I have a serial console I tend to put "-Dh" in /boot.config > (so I can choose an alternate loader if need be) and in that case boot2 would > eat the extra input and pause during the boot process (I've had this happen > occasionally). This patch wouldn't help with that case. Another suggestion > made on IRC was to simply drain input at the start of boot2 or loader to > avoid accepting early spurious input. This won't help if you are dealing > with noisy serial lines that are just spewing random garbage during the boot > process however. In a specific case we encountered, an unterminated cable plugged into a serial port caused enough signal to be reflected to produce a lossy loopback. This is a similar case to the random garbage case you suggest. My first stage loader isn't using the serial console, it's only when loader(8) starts that it switches. -Ed