Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Apr 2020 15:54:12 +0100
From:      Bob Eager <bob@eager.cx>
To:        freebsd-fs@freebsd.org
Subject:   Re: gpart bootcode Operation not permitted
Message-ID:  <20200403155412.4f4b1f49@raksha.tavi.co.uk>
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
I think you need to do this before starting the mirror.

So, boot from CD or USB, without loading geom_mirror.

Update the boot code.

Boot normally.

(I don't think the debug flags have been needed for a while; I never
set them in that situation)

On Fri, 3 Apr 2020 16:23:06 +0300
Artem Kuchin <artem@artem.ru> wrote:

> I am lost with this problem.
>=20
> I have gmirror:
>=20
> # gmirror status
>  =A0=A0=A0=A0=A0=A0 Name=A0=A0=A0 Status=A0 Components
> mirror/boot=A0 COMPLETE=A0 ada0p1 (ACTIVE)
>  =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ada1p=
1 (ACTIVE)
> mirror/swap=A0 COMPLETE=A0 ada0p2 (ACTIVE)
>  =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ada1p=
2 (ACTIVE)
> mirror/root=A0 COMPLETE=A0 ada0p3 (ACTIVE)
>  =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ada1p=
3 (ACTIVE)
>=20
>=20
> # gpart show
> =3D>=A0=A0=A0=A0=A0=A0 34=A0 976773101=A0 ada0=A0 GPT=A0 (466G) =20
>  =A0=A0=A0=A0=A0=A0=A0=A0 34=A0=A0=A0=A0=A0=A0=A0 128=A0=A0=A0=A0 1=A0 fr=
eebsd-boot=A0 (64K)
>  =A0=A0=A0=A0=A0=A0=A0 162=A0=A0=A0 8388608=A0=A0=A0=A0 2=A0 freebsd-swap=
=A0 (4.0G)
>  =A0=A0=A0 8388770=A0 968384365=A0=A0=A0=A0 3=A0 freebsd-ufs=A0 (462G)
>=20
> =3D>=A0=A0=A0=A0=A0=A0 34=A0 976773101=A0 ada1=A0 GPT=A0 (466G) =20
>  =A0=A0=A0=A0=A0=A0=A0=A0 34=A0=A0=A0=A0=A0=A0=A0 128=A0=A0=A0=A0 1=A0 fr=
eebsd-boot=A0 (64K)
>  =A0=A0=A0=A0=A0=A0=A0 162=A0=A0=A0 8388608=A0=A0=A0=A0 2=A0 freebsd-swap=
=A0 (4.0G)
>  =A0=A0=A0 8388770=A0 968384365=A0=A0=A0=A0 3=A0 freebsd-ufs=A0 (462G)
>=20
>=20
> And i want to update bootcode on both disks after freebsd updating
> from source.
>=20
>=20
> i Do
>=20
> sysctl -w kern.geom.debugflags=3D16
>=20
> # 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
>=20
> #gpart list
>=20
> Geom name: ada0
> modified: false
> state: OK
> fwheads: 16
> fwsectors: 63
> last: 976773134
> first: 34
> entries: 128
> scheme: GPT
> Providers:
> 1. Name: ada0p1
>  =A0=A0 Mediasize: 65536 (64K)
>  =A0=A0 Sectorsize: 512
>  =A0=A0 Stripesize: 0
>  =A0=A0 Stripeoffset: 17408
>  =A0=A0 Mode: r1w1e1
>  =A0=A0 efimedia: HD(1,GPT,346dc1b6-ca13-11e2-a56f-001cc0cc7f7d,0x22,0x80)
>  =A0=A0 rawuuid: 346dc1b6-ca13-11e2-a56f-001cc0cc7f7d
>  =A0=A0 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
>  =A0=A0 label: boot0
>  =A0=A0 length: 65536
>  =A0=A0 offset: 17408
>  =A0=A0 type: freebsd-boot
>  =A0=A0 index: 1
>  =A0=A0 end: 161
>  =A0=A0 start: 34
> 2. Name: ada0p2
>  =A0=A0 Mediasize: 4294967296 (4.0G)
>  =A0=A0 Sectorsize: 512
>  =A0=A0 Stripesize: 0
>  =A0=A0 Stripeoffset: 82944
>  =A0=A0 Mode: r1w1e1
>  =A0=A0 efimedia:
> HD(2,GPT,3ebf609f-ca13-11e2-a56f-001cc0cc7f7d,0xa2,0x800000) rawuuid:
> 3ebf609f-ca13-11e2-a56f-001cc0cc7f7d rawtype:
> 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: swap0
>  =A0=A0 length: 4294967296
>  =A0=A0 offset: 82944
>  =A0=A0 type: freebsd-swap
>  =A0=A0 index: 2
>  =A0=A0 end: 8388769
>  =A0=A0 start: 162
> 3. Name: ada0p3
>  =A0=A0 Mediasize: 495812794880 (462G)
>  =A0=A0 Sectorsize: 512
>  =A0=A0 Stripesize: 0
>  =A0=A0 Stripeoffset: 82944
>  =A0=A0 Mode: r1w1e1
>  =A0=A0 efimedia:=20
> HD(3,GPT,4797d671-ca13-11e2-a56f-001cc0cc7f7d,0x8000a2,0x39b85f6d)
>  =A0=A0 rawuuid: 4797d671-ca13-11e2-a56f-001cc0cc7f7d
>  =A0=A0 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
>  =A0=A0 label: root0
>  =A0=A0 length: 495812794880
>  =A0=A0 offset: 4295050240
>  =A0=A0 type: freebsd-ufs
>  =A0=A0 index: 3
>  =A0=A0 end: 976773134
>  =A0=A0 start: 8388770
> Consumers:
> 1. Name: ada0
>  =A0=A0 Mediasize: 500107862016 (466G)
>  =A0=A0 Sectorsize: 512
>  =A0=A0 Mode: r3w3e6
>=20
> Same for ada1
>=20
> What's wrong?
>=20
>=20
> --
>=20
> Artem
>=20
> _______________________________________________
> freebsd-fs@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"



--=20
Bob




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200403155412.4f4b1f49>