Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Dec 2013 11:24:44 -0500
From:      Thomas Hoffmann <trh411@gmail.com>
To:        Warren Block <wblock@wonkity.com>
Cc:        Mathieu Arnold <mat@freebsd.org>, freebsd-current <freebsd-current@freebsd.org>, freebsd-stable@freebsd.org
Subject:   Re: FreeBSD 10.0-RC3 Now Available
Message-ID:  <CAB7-od=i7xitXJU=-M%2BKLkH4iNw-mYbvZsMNjzitocfLB2ErLA@mail.gmail.com>
In-Reply-To: <alpine.BSF.2.00.1312270859430.32365@wonkity.com>
References:  <20131226162521.GK2009@glenbarber.us> <CA%2BWntOt26JXT3Bh8ccSM-fQ726c2Hy3F06n2iDbu3pLBXjn-AA@mail.gmail.com> <20131226212158.GD13109@glenbarber.us> <CACuV5sCjjsjFK9AjJ7saRPpDktwxf1rd6a-M2FKXXYf-EaBy2w@mail.gmail.com> <BCB09816844D0B52B1EFE964@atuin.in.mat.cc> <CACuV5sD2Cw=iZ=uE8BjcV6j8-Bc8ppChQ=ZPKZ7uFTXQLmhCxQ@mail.gmail.com> <2F6DABD655B7C3230EC0F15D@ogg.in.absolight.net> <CAB7-odmH-b=%2B_-BwF1jt7EMdTxpK-P%2Bw%2Bp6Ce9-k7mRvXpLzog@mail.gmail.com> <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
After I posted, it occurred to me to check out the
../bsdinstall/scripts/zfsboot  script to see how the boot code was laid
down when the MBR was created. It shows only:

dd if=3D/boot/zfsboot of=3D/dev/ada0s1 count =3D1

But, adding to my confusion, the FreeBSD wiki for ZFS on root (MBR-style)
shows something very close to what Mathieu suggested.

Unfortunately, I'm using an iMac with FreeBSD as the only OS. MBR is the
only way I can get it to boot after an install.

Looks like I've got some testing (and possible system restores) ahead of me=
.

Thanks.


On Fri, Dec 27, 2013 at 11:08 AM, Warren Block <wblock@wonkity.com> wrote:

> On Fri, 27 Dec 2013, Mathieu Arnold wrote:
>
>  +--On 27 d=E9cembre 2013 10:28:07 -0500 Thomas Hoffmann <trh411@gmail.co=
m>
>> wrote:
>> | All the examples I've seen for updating bootcode assume GPT. If one ha=
s
>> | 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
>>
>
> No, the PMBR is for GPT partitioning only.
>
>
>  | where the boot code is /boot/zfsboot (rather than /boot/gptzfsboot) an=
d
>> | ada0s1 is the slice on which FreeBSD is installed?
>>
>> Hum, no, if you're using MBR and not GPT, you can't use gpart,
>>
>
> Why not?  gpart is not GPT-specific.  It handles MBR and BSDlabel bootcod=
e
> correctly.
>
>
>  you have to
>> do something aweful like this :
>> # dd if=3D/boot/zfsboot of=3D/dev/ada0 count=3D1
>>
>
> That will overwrite the MBR partition table.
>
>
>  # sysctl kern.geom.debugflags=3D0x10
>> # dd if=3D/boot/zfsboot of=3D/dev/ada0 skip=3D1 seek=3D1024
>>
>
> That seems dangerous.  I have not tried with zfsboot, but this should be
> close:
>
>   # gpart bootcode -b /boot/zfsboot ada0
>   # gpart bootcode -b /boot/zfsboot ada0s1
>
> Untested!  The first one may need to use /boot/mbr.  A better way to do
> this, provided the system does not have a broken BIOS, would be to backup=
,
> repartition with GPT, and restore, avoiding the complication of multiple
> partitioning schemes.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAB7-od=i7xitXJU=-M%2BKLkH4iNw-mYbvZsMNjzitocfLB2ErLA>