From owner-freebsd-stable@freebsd.org Sun Oct 23 13:53:41 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 D8F38C1E7B8 for ; Sun, 23 Oct 2016 13:53:41 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from kagate.punkt.de (kagate.punkt.de [217.29.33.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84446F34 for ; Sun, 23 Oct 2016 13:53:40 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from hugo10.ka.punkt.de (hugo10.ka.punkt.de [217.29.44.10]) by gate2.intern.punkt.de with ESMTP id u9NDrWv2058492; Sun, 23 Oct 2016 15:53:32 +0200 (CEST) Received: from [217.29.46.116] ([217.29.46.116]) by hugo10.ka.punkt.de (8.14.2/8.14.2) with ESMTP id u9NDrUlF097266; Sun, 23 Oct 2016 15:53:31 +0200 (CEST) (envelope-from hausen@punkt.de) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: boot0cfg on does not set default selection on gmirror device From: "Patrick M. Hausen" In-Reply-To: <20161022140755.S6806@sola.nimnet.asn.au> Date: Sun, 23 Oct 2016 15:53:59 +0200 Cc: freebsd-stable , Wolfgang Zenker , =?utf-8?Q?J=C3=B6rg_Schweizer?= Content-Transfer-Encoding: quoted-printable Message-Id: References: <14FD5FE6-6277-4EBE-8EE9-630A735F8BEA@punkt.de> <54B556F6-B834-4B0C-A9A4-90B9AD80A668@punkt.de> <20161022140755.S6806@sola.nimnet.asn.au> To: Ian Smith X-Mailer: Apple Mail (2.3124) 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: Sun, 23 Oct 2016 13:53:41 -0000 Hi, Ian, > Am 22.10.2016 um 05:36 schrieb Ian Smith : > [...] > I wonder two things: >=20 > Do 'boot0cfg -v ada0' and 'boot0cfg -v ada1' both report the same? OK, situation before I try to change anything: root@hd45:~ # boot0cfg -v mirror/m0 [...] default_selection=3DF1 (Slice 1) root@hd45:~ # boot0cfg -v ada0 [...] default_selection=3DF1 (Slice 1) root@hd45:~ # boot0cfg -v ada1 [...] default_selection=3DF1 (Slice 1) Now try to change it to F2 through the mirror device: root@hd45:~ # boot0cfg -s 2 mirror/m0 # No error message or other indication that something went wrong! root@hd45:~ # boot0cfg -v mirror/m0 [...] default_selection=3DF1 (Slice 1) root@hd45:~ # boot0cfg -v ada0 [...] default_selection=3DF1 (Slice 1) root@hd45:~ # boot0cfg -v ada1 [...] default_selection=3DF1 (Slice 1) > Might it work properly if you upgraded the boot sectors to version 2,=20= > which is what you should get if you reinstall from current boot0cfg,=20= > 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=3D2.0 drive=3D0x80 mask=3D0xf ticks=3D182 bell=3D# (0x23) options=3Dpacket,update,nosetdrv volume serial ID b100-808f default_selection=3DF2 (Slice 2) root@hd45:~ # boot0cfg -v ada0 [...] default_selection=3DF2 (Slice 2) root@hd45:~ # boot0cfg -v ada1 [...] default_selection=3DF2 (Slice 2) Revert the change: root@hd45:~ # boot0cfg -s 1 mirror/m0 root@hd45:~ # boot0cfg -v mirror/m0 [...] default_selection=3DF1 (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. Actual reboot of this production machine in two weeks when we run our regular updates. But I expect that to "just work". Patrick --=20 punkt.de GmbH * Kaiserallee 13a * 76133 Karlsruhe Tel. 0721 9109 0 * Fax 0721 9109 100 info@punkt.de http://www.punkt.de Gf: J=C3=BCrgen Egeling AG Mannheim 108285