From owner-freebsd-fs@freebsd.org Fri Apr 3 14:54:37 2020 Return-Path: Delivered-To: freebsd-fs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A3F42A554E for ; Fri, 3 Apr 2020 14:54:37 +0000 (UTC) (envelope-from bob@eager.cx) Received: from kipling.tavi.co.uk (kipling.tavi.co.uk [81.187.145.130]) by mx1.freebsd.org (Postfix) with ESMTP id 48v2yR4D58z4Z31 for ; Fri, 3 Apr 2020 14:54:22 +0000 (UTC) (envelope-from bob@eager.cx) Received: from kipling.tavi.co.uk (localhost [127.0.0.1]) by kipling.tavi.co.uk (Postfix) with ESMTP id 2E3573BA2A for ; Fri, 3 Apr 2020 15:54:13 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=eager.cx; h=date:from:to :subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=selector1; bh=oeBUF3X 18yDOsZu0ux8IAbXGs4c=; b=VawVXqzZq+peVAtpNBAAMgvq2qIjzc9FF/Qr+qp DeV6dQ/IBATwU1l/xzX14asGyhEE1aGkikQT3XCYg9UmolNkWR+KQkSi1RkB9/uG rr9QO/93Gy0eOVXC0SZpYWt0/r829zPtetnkUUY51ZF7agR1muChMKrUHoxgX0gB 4Hf8= Received: from raksha.tavi.co.uk (raksha.tavi.co.uk [81.187.145.139]) (Authenticated sender: rde@tavi.co.uk) by kipling.tavi.co.uk (Postfix) with ESMTPA id EBE923B7E1 for ; Fri, 3 Apr 2020 15:54:12 +0100 (BST) Date: Fri, 3 Apr 2020 15:54:12 +0100 From: Bob Eager 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> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUwXjFLc0vD0cS7y7zw9PDZ4tkWSRaVrZZ+m39qi2tXfVj////7+/utwK4IPggAOAAJUUA7AAABKklEQVQ4jWPYjQMwDFYJp0NKEKCNJmEf9h8CsimXiL2e33s3/e7F7K2Cs3f3dCMkQkMKj4YuCY3K3iR+e7fMaiSjvkX0/5cFGrWpe2uLzOpaExUVqMS/8PX/Re5ey960OLBTZpFA8+IlSBKPQ92zNyUUBsosN58uIY0k8f+/ONCoYytkVuhWzVwNkYiYbqk5M3NmOVBi41YZ8RsGF7shEtFb5KJ3r969CyixM7OTPeFUxG2IxLO8/9/SvqXlc+/x3h295YzLlj2nIRJQj//nRvc5TEIal8RsXBLVuCQwIgoq/u80DomP6HEOk/iOS+IJLonZOCT+ReOQ+Lkbh0QKLonbOCR+7MYhsRqHBJrVcIl/1TgklqKLQyQ+tGKIgyQOqXpjig94diZRAgAXmDX6jyWafAAAAABJRU5ErkJggg====== MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48v2yR4D58z4Z31 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=eager.cx header.s=selector1 header.b=VawVXqzZ; dmarc=pass (policy=none) header.from=eager.cx; spf=pass (mx1.freebsd.org: domain of bob@eager.cx designates 81.187.145.130 as permitted sender) smtp.mailfrom=bob@eager.cx X-Spamd-Result: default: False [-6.49 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[eager.cx:s=selector1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:kipling.tavi.co.uk]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[eager.cx:+]; DMARC_POLICY_ALLOW(-0.50)[eager.cx,none]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-3.59)[ip: (-9.50), ipnet: 81.187.0.0/16(-4.70), asn: 20712(-3.67), country: GB(-0.07)]; ASN(0.00)[asn:20712, ipnet:81.187.0.0/16, country:GB] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 14:54:37 -0000 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 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