Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Dec 2013 11:34:34 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Warren Block <wblock@wonkity.com>, Mathieu Arnold <mat@freebsd.org>, Thomas Hoffmann <trh411@gmail.com>, freebsd-stable@freebsd.org
Subject:   Re: FreeBSD 10.0-RC3 Now Available
Message-ID:  <201312271134.34266.jhb@freebsd.org>
In-Reply-To: <alpine.BSF.2.00.1312270859430.32365@wonkity.com>
References:  <20131226162521.GK2009@glenbarber.us> <38B0C411B75D7482B92033D2@ogg.in.absolight.net> <alpine.BSF.2.00.1312270859430.32365@wonkity.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <trh411@gmai=
l.com>
> > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312271134.34266.jhb>