From owner-freebsd-stable@freebsd.org Mon Oct 24 02:50:51 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A124C1E5DF for ; Mon, 24 Oct 2016 02:50:51 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2E25381 for ; Mon, 24 Oct 2016 02:50:49 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id u9O2oiYA089300; Mon, 24 Oct 2016 13:50:45 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Mon, 24 Oct 2016 13:50:44 +1100 (EST) From: Ian Smith To: "Patrick M. Hausen" cc: freebsd-stable Subject: Re: boot0cfg on does not set default selection on gmirror device In-Reply-To: Message-ID: <20161024133403.D6806@sola.nimnet.asn.au> References: <14FD5FE6-6277-4EBE-8EE9-630A735F8BEA@punkt.de> <54B556F6-B834-4B0C-A9A4-90B9AD80A668@punkt.de> <20161022140755.S6806@sola.nimnet.asn.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 02:50:51 -0000 On Sun, 23 Oct 2016 15:53:59 +0200, Patrick M. Hausen wrote: > > Am 22.10.2016 um 05:36 schrieb Ian Smith : > > [...] > > I wonder two things: > > > > Do 'boot0cfg -v ada0' and 'boot0cfg -v ada1' both report the same? Summary: yes, both equally wrong! > > Might it work properly if you upgraded the boot sectors to version 2, > > which is what you should get if you reinstall from current boot0cfg, > > presumably without touching the MBR data, but you'll have backups .. > > Well ... > > root@hd45:~ # boot0cfg -B mirror/m0 > root@hd45:~ # boot0cfg -s 2 mirror/m0 > root@hd45:~ # boot0cfg -v mirror/m0 > # flag start chs type end chs offset size > 1 0x80 1: 0: 1 0xa5 1022:254:63 16065 16418430 > 2 0x00 1023: 0: 1 0xa5 1020:254:63 16434495 16418430 > 3 0x00 1021: 0: 1 0xa5 768:254:63 32852925 1920667140 > > version=2.0 drive=0x80 mask=0xf ticks=182 bell=# (0x23) > options=packet,update,nosetdrv > volume serial ID b100-808f > default_selection=F2 (Slice 2) > > root@hd45:~ # boot0cfg -v ada0 > [...] > default_selection=F2 (Slice 2) > > root@hd45:~ # boot0cfg -v ada1 > [...] > default_selection=F2 (Slice 2) > > Revert the change: > > root@hd45:~ # boot0cfg -s 1 mirror/m0 > root@hd45:~ # boot0cfg -v mirror/m0 > [...] > default_selection=F1 (Slice 1) > > > That did it! These machines have been in production for some time > starting with FreeBSD 8.x and have been upgraded via NanoBSD style > dd followed by reboot all the time up to 10.3, now. Hence I never touched > the bootcode. Glad that one of my wild ill-informed wonderings was on target, and that gmirror is off the hook. > Actual reboot of this production machine in two weeks when we run our > regular updates. But I expect that to "just work". Warner expected the existing boot0cfg code to "just work" too. And it does, except that the upgrades to it failed to include a method to fix existing installations retrospectively! cheers, Ian