From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 10 09:27:02 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 662CC1065674; Mon, 10 Jan 2011 09:27:02 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 1E0EC8FC16; Mon, 10 Jan 2011 09:27:01 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1PcE1k-00020L-DJ; Mon, 10 Jan 2011 11:27:00 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Tom Judge In-reply-to: <4D29ED16.7030401@tomjudge.com> References: <4D295820.20807@tomjudge.com> <4D29ED16.7030401@tomjudge.com> Comments: In-reply-to Tom Judge message dated "Sun, 09 Jan 2011 11:15:02 -0600." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 10 Jan 2011 11:27:00 +0200 From: Daniel Braniss Message-ID: Cc: freebsd-hackers@freebsd.org, luigi@freebsd.org Subject: Re: sys/boot/boot0/boot0.S - r186598 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2011 09:27:02 -0000 > This is an OpenPGP/MIME signed message (RFC 2440 and 3156) > --------------enig0AE178BF2380C8CAA3249E0C > Content-Type: text/plain; charset=ISO-8859-1 > Content-Transfer-Encoding: quoted-printable > > On 09/01/2011 04:38, Daniel Braniss wrote: > >> There was a post on the embedded list that suggested this work around:= > > >> echo 'a 2' | fdisk -f /dev/stdin ad0 > >> boot0cfg -s 2 ad0 > >> > >> There are 2 issues with this: > >> 1) It can't be done without setting kern.geom.debugflags to 0x10. > >> 2) It resulted in most/all commands resulting in the error message > >> "Device not configured" including the second command and 'shutdown -r = > now=3D > >> '. > >> > >> Both of which leave this really work around fairly broken. > > the problem is that boot0cfg -s does NOT update the boot block, it fail= > s! > > the work around is: > > boot0cfg -s -t n dev > > then > > gpart set -a active -i n dev > > > > danny > > > Hi Danny, > > The bug does not seem to be in boot0cfg as: > > 1) It succeeds to write the new configuration to the boot block every > time i have tried. > 2) It does not touch the partition table at all only the mbr, so it was > never designed to change the active partition. arguable, since it used to work. > > If this is not a bug in boot0 then its a bug in the man pages for > boot0cfg as it does make reference to having to change the active slice > to make this work. the problem is not as simple as it looks, and I don't have all the answers, but after spendig much time on this, it seems that not all BIOSes behave in a 'standard way' :-) danny