Problem updating bootcode on ZFS on root system with MBR

Scot Hetzel swhetzel at gmail.com
Sun Jan 26 08:46:30 UTC 2014


On Tue, Jan 21, 2014 at 3:11 PM, Thomas Hoffmann <trh411 at gmail.com> wrote:
> On Tue, Jan 21, 2014 at 10:47 AM, Andriy Gapon <avg at freebsd.org> wrote:
>
>> on 21/01/2014 13:18 Andrey V. Elsukov said the following:
>> > On 21.01.2014 14:45, Andriy Gapon wrote:
>> >>>> What do I need to do to get the boot2 code written to /dev/ada0s1a?
>> >>>

>> >>>> # dd if=/boot/zfsboot of=/dev/ada0s1a skip=1 seek=1024
>> >>>> dd: /dev/ada0s1a: Operation not permitted

> Thanks for the responses. My apologies for going silent, but I had to step
> away from the problem for a bit. I was able to resolve my problem by doing
> the following:
>
> After upgrading my zpools and after my aborted attempt to update the
> bootcode as reported above, I copied /boot/zfsboot (or more precisely
> /bootpool/boot/zfsboot) to a USB thumb drive. I attempted to reboot my
> system, which failed due to unsupported zfs features. This was expected,
> but I thought, hey, I might get lucky. I then booted into a Live CD,
> mounted my USB thumb drive on /tmp/usb and executed:
>
> sysctl kern.geom.debugflags=0x10
> dd if=/tmp/usb/zfsboot of=/dev/ada0s1 count=1
> dd if=/tmp/usb/zfsboot of=/dev/ada0s1d skip=1 seek=1024
>
> Then I rebooted and all is well. All zpools support all features. While
> this procedure was not tedious, it would still be nice if, as Andriy
> stated, FreeBSD contained a native way do this zfs bootcode update for MBR
> schemes that is as simple as for the GPT schemes.
>
In your original message, you were trying to write the boot code to
ada0s1a, but you made it work by using ada0s1d.

Do you have an ada0s1a?  If you do, is it your ZFS partition or is it ada0s1d?

-- 
DISCLAIMER:

No electrons were maimed while sending this message. Only slightly bruised.


More information about the freebsd-current mailing list