Re: FreeBSD 10.0-RC3 Now Available
On Fri, Dec 27, 2013 at 10: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 has
>> | 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) and
>> | 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 bootcode
> 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.
>
The correct way to install/update ZFS Boot code on an MBR disk is:
Install boot Manager (required on first install)
# gpart bootcode -b /boot/boot0 ad0
Note: /boot/mbr could also be used if you are not multibooting
Install ZFS boot1 stage
# sysctl kern.geom.debugflags=3D0x10
# dd if=3D/boot/zfsboot of=3D/dev/ada0s1 count=3D1
or
# dd if=3D/boot/zfsboot of=3D/tmp/zfsboot1 count=3D1
# gpart bootcode -b /tmp/zfsboot1 /dev/ada0s1
Install ZFS boot2 stage
# dd if=3D/boot/zfsboot of=3D/dev/ada0s1a skip=3D1 seek=3D1024
-- =
DISCLAIMER:
No electrons were maimed while sending this message. Only slightly bruised.
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 19 之 20 篇):