From owner-freebsd-embedded@FreeBSD.ORG Tue May 12 15:48:11 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B0DD1065673 for ; Tue, 12 May 2009 15:48:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0E2D38FC0A for ; Tue, 12 May 2009 15:48:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id A245946B23; Tue, 12 May 2009 11:48:10 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 3F69C8A025; Tue, 12 May 2009 11:48:09 -0400 (EDT) From: John Baldwin To: freebsd-embedded@freebsd.org Date: Tue, 12 May 2009 10:08:18 -0400 User-Agent: KMail/1.9.7 References: <200904201535.21191.nick@van-laarhoven.org> <200905110940.31187.jhb@freebsd.org> <20090512075254.GA88230@psconsult.nl> In-Reply-To: <20090512075254.GA88230@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905121008.19196.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 12 May 2009 11:48:09 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Subject: Re: nanobsd boot slice selection does not work X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 15:48:11 -0000 On Tuesday 12 May 2009 3:52:54 am Paul Schenkeveld wrote: > On Mon, May 11, 2009 at 09:40:31AM -0400, John Baldwin wrote: > > On Tuesday 05 May 2009 10:49:38 am Paul Schenkeveld wrote: > > > On Mon, Apr 20, 2009 at 03:55:23PM +0200, Matthias Teege wrote: > > > > Moin, > > > > > > > > > I've seen this problem as well, but can't for the life of me remember > > what I > > > > > > > > I'm relieved to hear that. > > > > > > Ok, a bit late (interrupt storm generated by device $WORK) but I just > > > tested with a clean 7.2-RELEASE source tree. I too can report this > > > regression in boot0 which now looks at the active flag in a MBR table > > > entry instead of its own default partition byte when not choosing the > > > partition by pressing 1 or 2 at the prompt. This is a regression. > > > > > > The boot0 source code appears to have had a complete overhaul between > > > 7.1 and 7.2. > > > > > > As a workaround, use the 7.1 boot0 source (or even use 7.1 completely > > > if you care about the anticipated eol of the release). > > > > > > I hope Luigi will have some time to look at the default drive delection > > > algorithm again zome time soon. > > > > I think you can simply re-enable the 'update' flag using boot0cfg in 7.2 to > > fix this? > > The update flag is on, besides it controls whether the first sector is > written back or not after selecting another slice than the default using > the keyboard. The problem above shows that the 'default' slice variable > in sector 0 is not read anymore but the MBR records are searched for > an active flag. Using the (M$DOS-compatible) active flag only slices > 1-4 can be set as default, the boot0 default variable also allows for > selection 5 (next disk) and probably also 6 (pxe boot) to be saved as > default. Err, so one of the things you need to keep in mind, is that boot1 re-reads the MBR and uses the "active" flag to determine where to load boot2 from (and where boot2 loads /boot/loader from and /boot/loader loads the kernel and /etc/fstab from). boot1 prefers an active slice to a non-active slice, so if boot0 doesn't write back an updated MBR with the active slice changed, then even if you load the boot1 from slice 2, it will still boot slice 1 if the active flag is set on slice 1. Note that this is not in boot0, but in boot1. However, having 'update' enabled should fix this. -- John Baldwin