From owner-freebsd-current@FreeBSD.ORG Fri Dec 27 17:10:30 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7649996B; Fri, 27 Dec 2013 17:10:30 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0A31F20; Fri, 27 Dec 2013 17:10:30 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3A31BB94F; Fri, 27 Dec 2013 12:10:29 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: FreeBSD 10.0-RC3 Now Available Date: Fri, 27 Dec 2013 11:34:34 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <20131226162521.GK2009@glenbarber.us> <38B0C411B75D7482B92033D2@ogg.in.absolight.net> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201312271134.34266.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Dec 2013 12:10:29 -0500 (EST) Cc: Warren Block , Mathieu Arnold , Thomas Hoffmann , freebsd-stable@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 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, 27 Dec 2013 17:10:30 -0000 On Friday, December 27, 2013 11:08:08 am Warren Block wrote: > On Fri, 27 Dec 2013, Mathieu Arnold wrote: >=20 > > +--On 27 d=C3=A9cembre 2013 10:28:07 -0500 Thomas Hoffmann > > wrote: > > | All the examples I've seen for updating bootcode assume GPT. If one h= as > > | MBR (as I do) and assuming the following basic scheme: > > | > > | gpart show ada0 > > | =3D> 63 976773105 ada0 MBR (466G) > > | 63 976773105 1 freebsd [active] (466G) > > | > > | gpart show ada0s1 > > | =3D> 0 976773105 ada0s1 BSD (466G) > > | 0 943218736 1 freebsd-zfs (450G) > > | 943218736 33554369 2 freebsd-swap (16G) > > | > > | would the equivalent bootcode statement be: > > | > > | gpart bootcode -b /boot/pmbr -p /boot/zfsboot ada0s1 >=20 > No, the PMBR is for GPT partitioning only. >=20 > > | where the boot code is /boot/zfsboot (rather than /boot/gptzfsboot) a= nd > > | ada0s1 is the slice on which FreeBSD is installed? > > > > Hum, no, if you're using MBR and not GPT, you can't use gpart, >=20 > Why not? gpart is not GPT-specific. It handles MBR and BSDlabel=20 > bootcode correctly. >=20 > > you have to > > do something aweful like this : > > # dd if=3D/boot/zfsboot of=3D/dev/ada0 count=3D1 >=20 > That will overwrite the MBR partition table. >=20 > > # sysctl kern.geom.debugflags=3D0x10 > > # dd if=3D/boot/zfsboot of=3D/dev/ada0 skip=3D1 seek=3D1024 >=20 > That seems dangerous. I have not tried with zfsboot, but this should be= =20 > close: >=20 > # gpart bootcode -b /boot/zfsboot ada0 > # gpart bootcode -b /boot/zfsboot ada0s1 No, the ZFS MBR bootstrap doesn't use the "standard" boot block areas. The only "standard" boot block area for ada0 is the MBR itself, but ZFS uses a larger bootloader that installs one part into the MBR and another part a few sectors later in the disk. gpart has no knowledge of that AFAIK. =2D-=20 John Baldwin