Date: Sun, 05 Apr 2020 14:40:23 +0200 From: "Florian Schulze" <mail@florian-schulze.net> To: "Artem Kuchin" <artem@artem.ru> Cc: freebsd-fs@freebsd.org Subject: Re: gpart bootcode Operation not permitted Message-ID: <C37380B2-1B40-4CB8-9867-946DB92FBF14@florian-schulze.net> 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
Hi! Not sure if this applies to you, but for me the issue was that the boot partition was too small. I removed the swap, removed the swap partition, resized the boot partition, recreated swap partition, re-added swap and then wrote the boot code. Regards, Florian Schulze On 3 Apr 2020, at 15:23, Artem Kuchin wrote: > I am lost with this problem. > > I have gmirror: > > # gmirror status > Name Status Components > mirror/boot COMPLETE ada0p1 (ACTIVE) > ada1p1 (ACTIVE) > mirror/swap COMPLETE ada0p2 (ACTIVE) > ada1p2 (ACTIVE) > mirror/root COMPLETE ada0p3 (ACTIVE) > ada1p3 (ACTIVE) > > > # gpart show > => 34 976773101 ada0 GPT (466G) > 34 128 1 freebsd-boot (64K) > 162 8388608 2 freebsd-swap (4.0G) > 8388770 968384365 3 freebsd-ufs (462G) > > => 34 976773101 ada1 GPT (466G) > 34 128 1 freebsd-boot (64K) > 162 8388608 2 freebsd-swap (4.0G) > 8388770 968384365 3 freebsd-ufs (462G) > > > And i want to update bootcode on both disks after freebsd updating > from source. > > > i Do > > sysctl -w kern.geom.debugflags=16 > > # 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 > > > #gpart list > > Geom name: ada0 > modified: false > state: OK > fwheads: 16 > fwsectors: 63 > last: 976773134 > first: 34 > entries: 128 > scheme: GPT > Providers: > 1. Name: ada0p1 > Mediasize: 65536 (64K) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 17408 > Mode: r1w1e1 > efimedia: > HD(1,GPT,346dc1b6-ca13-11e2-a56f-001cc0cc7f7d,0x22,0x80) > rawuuid: 346dc1b6-ca13-11e2-a56f-001cc0cc7f7d > rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f > label: boot0 > length: 65536 > offset: 17408 > type: freebsd-boot > index: 1 > end: 161 > start: 34 > 2. Name: ada0p2 > Mediasize: 4294967296 (4.0G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 82944 > Mode: r1w1e1 > 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 > length: 4294967296 > offset: 82944 > type: freebsd-swap > index: 2 > end: 8388769 > start: 162 > 3. Name: ada0p3 > Mediasize: 495812794880 (462G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 82944 > Mode: r1w1e1 > efimedia: > HD(3,GPT,4797d671-ca13-11e2-a56f-001cc0cc7f7d,0x8000a2,0x39b85f6d) > rawuuid: 4797d671-ca13-11e2-a56f-001cc0cc7f7d > rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b > label: root0 > length: 495812794880 > offset: 4295050240 > type: freebsd-ufs > index: 3 > end: 976773134 > start: 8388770 > Consumers: > 1. Name: ada0 > Mediasize: 500107862016 (466G) > Sectorsize: 512 > Mode: r3w3e6 > > Same for ada1 > > What's wrong? > > > -- > > Artem > > _______________________________________________ > 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C37380B2-1B40-4CB8-9867-946DB92FBF14>