Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Apr 2020 10:59:32 +0300
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        Artem Kuchin <artem@artem.ru>, freebsd-fs@freebsd.org
Subject:   Re: gpart bootcode Operation not permitted
Message-ID:  <9b871532-23a1-4029-ecb4-ead8ba060dd8@yandex.ru>
In-Reply-To: <27955efa-01f2-88f6-6a28-d9d8a62dfa2a@artem.ru>
References:  <27955efa-01f2-88f6-6a28-d9d8a62dfa2a@artem.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--qO51It5OFaIxhVMv0s3xMr4OPjzytTHGg
Content-Type: multipart/mixed; boundary="VhS3rVpm4m4qZLfolyE5AVER8L7JSmCPB";
 protected-headers="v1"
From: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: Artem Kuchin <artem@artem.ru>, freebsd-fs@freebsd.org
Message-ID: <9b871532-23a1-4029-ecb4-ead8ba060dd8@yandex.ru>
Subject: Re: gpart bootcode Operation not permitted
References: <27955efa-01f2-88f6-6a28-d9d8a62dfa2a@artem.ru>
In-Reply-To: <27955efa-01f2-88f6-6a28-d9d8a62dfa2a@artem.ru>

--VhS3rVpm4m4qZLfolyE5AVER8L7JSmCPB
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

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

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
>=20
>=20
> # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada1
> gpart: /dev/ada1p1: Operation not permitted
>=20
> 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=3D/boot/gptboot of=3D/dev/mirror/boot

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

--=20
WBR, Andrey V. Elsukov


--VhS3rVpm4m4qZLfolyE5AVER8L7JSmCPB--

--qO51It5OFaIxhVMv0s3xMr4OPjzytTHGg
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAl6K4WQACgkQAcXqBBDI
oXpGNwf/cCAaMVtYZuJOXmYAx0S7/3j1dOVuSkjq1yz7sxZHwbqDeG4EdPzpy8sE
AuksIz4i8EfOkCq136DqOv9AKLIoFS9zWFsIMXFNyM37H5i7zjCxEe/D+aDStzDr
jwBXR5hmqnhu8oleGKWFWyXUkkthj8hdjeSJoSeW6WwE3U52gBr//H1UR/fymnW1
AZTrvdW1m9l3nVHlFVj7P/BdWZLymay7u7rZ3AfvhCVDPe/lcv7v9k+tkfMw67tQ
M8Tphaq1evlTsMfni9rGf3sBXzv8Z1bBTnJZUH7j33Cfmw8onKP9ab7WyOxJdobV
0rnul7n8/KJLz4c69dnxY7PT6Mxj6w==
=fhR6
-----END PGP SIGNATURE-----

--qO51It5OFaIxhVMv0s3xMr4OPjzytTHGg--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9b871532-23a1-4029-ecb4-ead8ba060dd8>