gpart bootcode Operation not permitted

Andrey V. Elsukov bu7cher at yandex.ru
Mon Apr 6 08:03:22 UTC 2020


On 03.04.2020 16:23, Artem Kuchin wrote:
> sysctl -w kern.geom.debugflags=16

This is not needed. It will be better if you forget this option.

> # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0
> gpart: /dev/ada0p1: Operation not permitted
> 
> 
> # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada1
> gpart: /dev/ada1p1: Operation not permitted
> 
> What's wrong?

In your case you only can write pmbr using gpart(8):

# gpart bootcode -b /boot/pmbr ada0
# gpart bootcode -b /boot/pmbr ada1

Then you can write gptboot to the mirror using dd(1):

# dd if=/boot/gptboot of=/dev/mirror/boot

You can't write gptboot to the partition using gpart(8) because it is
exclusively used by geom_mirror.

-- 
WBR, Andrey V. Elsukov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20200406/0ff8aa6d/attachment.sig>


More information about the freebsd-fs mailing list