From nobody Thu Mar 31 00:36:22 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C34481A4089F for ; Thu, 31 Mar 2022 00:36:25 +0000 (UTC) (envelope-from grog@lemis.com) Received: from lax.lemis.com (www.lemis.com [45.32.70.18]) by mx1.freebsd.org (Postfix) with ESMTP id 4KTPVw5jr8z4bmQ for ; Thu, 31 Mar 2022 00:36:24 +0000 (UTC) (envelope-from grog@lemis.com) Received: from eureka.lemis.com (121-200-11-253.79c80b.mel.nbn.aussiebb.net [121.200.11.253]) by lax.lemis.com (Postfix) with ESMTP id 270B32809E; Thu, 31 Mar 2022 00:36:23 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id 7C1A42635C0; Thu, 31 Mar 2022 11:36:22 +1100 (AEDT) Date: Thu, 31 Mar 2022 11:36:22 +1100 From: Greg 'groggy' Lehey To: Greg Balfour Cc: Arthur Chance , freebsd-questions@freebsd.org Subject: Re: GPT header checksum mismatch Message-ID: <20220331003622.GK60301@eureka.lemis.com> References: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkEkAx9hr54EJ73W" Content-Disposition: inline In-Reply-To: Organization: The FreeBSD Project Phone: +61-3-5309-0418 Mobile: +61-490-494-038. Use only as instructed. WWW-Home-Page: https://www.FreeBSD X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 User-Agent: Mutt/1.6.1 (2016-04-27) X-Rspamd-Queue-Id: 4KTPVw5jr8z4bmQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of grog@lemis.com designates 45.32.70.18 as permitted sender) smtp.mailfrom=grog@lemis.com X-Spamd-Result: default: False [-4.69 / 15.00]; ARC_NA(0.00)[]; FORGED_SENDER(0.30)[grog@FreeBSD.org,grog@lemis.com]; FREEFALL_USER(0.00)[grog]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:www.lemis.com]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.70)[-0.696]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; MLMMJ_DEST(0.00)[freebsd-questions]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; SIGNED_PGP(-2.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:45.32.64.0/19, country:US]; FROM_NEQ_ENVFROM(0.00)[grog@FreeBSD.org,grog@lemis.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --vkEkAx9hr54EJ73W Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wednesday, 30 March 2022 at 11:23:38 -0500, Greg Balfour wrote: > On Tue, Mar 29, 2022 at 11:47 AM Arthur Chance wrote: >> On 29/03/2022 15:45, Greg Balfour wrote: >>> Running 12.3-RELEASE I had a UPS failure and my machine did a reboot >>> without properly shutting down. Now when it boots I see this >>> message: >>> >>> gptboot: backup GPT header checksum mismatch >>> >>> Doing a "gpart show ada0" shows >>> >>> 34 976773101 ada0 GPT (466G) [CORRUPT] >>> >>> The machine still boots fine. I don't have a prior dump of the >>> partition table saved. How can I clean up these errors? >> >> Try gpart recover. > > So I did a recover and it appeared to work... > > # gpart recover ada0 > ada0 recovered > > And a gpart status on ada0 was no longer showing as corrupted. But after > rebooting I still get the header checksum mismatch error and a gpart > status on ada0 will show again as corrupted. Also seen on boot: > > Mar 30 08:21:01 desktop kernel: GEOM: ada0: the secondary GPT table is corrupt or invalid. > Mar 30 08:21:01 desktop kernel: GEOM: ada0: using the primary only -- recovery suggested. > > This is repeatable. A gpart recover appears to work but on reboot > everything shows as corrupted again. Interesting. Could you enter a PR, please? Start at https://bugs.freebsd.org/bugzilla/enter_bug.cgi We need at least the following information: 1. Output of 'grep ada /var/run/dmesg.boot'. This will give details about the disk, and also the number of sectors, which you'll need below. Take the number of sectors and subtract 32 for the next steps (noted as SECS-32). 2. After 'gpart recover', the files created by dd if=/dev/ada0 count=33 of=gpt-before.start dd if=/dev/ada0 iseek=SECS-32 of=gpt-before.end The second dd should transfer exactly 16384 bytes. 3. After reboot, the files created by dd if=/dev/ada0 count=33 of=gpt-after.start dd if=/dev/ada0 iseek=SECS-32 of=gpt-after.end The second dd should transfer exactly 16384 bytes. Supply this information as attachments to the bug report. I'd also appreciate being informed, though I don't promise to be the one to investigate the problem. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html Sent from my desktop computer. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft mail program reports problems, please read http://lemis.com/broken-MUA.php --vkEkAx9hr54EJ73W Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAmJE94YACgkQIubykFB6QiNNFgCfR3tWSCfsoznbxhrL05Up6rfP xbMAn0NFZW9vbH2AOlnXqe1NXkgoz+my =fTC+ -----END PGP SIGNATURE----- --vkEkAx9hr54EJ73W--