From owner-freebsd-current@FreeBSD.ORG Wed Jul 29 03:30:21 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 268881065687 for ; Wed, 29 Jul 2009 03:30:21 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout030.mac.com (asmtpout030.mac.com [17.148.16.105]) by mx1.freebsd.org (Postfix) with ESMTP id 1132C8FC15 for ; Wed, 29 Jul 2009 03:30:20 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from [172.24.241.129] (natint3.juniper.net [66.129.224.36]) by asmtp030.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KNI00E8RXQJML40@asmtp030.mac.com> for freebsd-current@freebsd.org; Tue, 28 Jul 2009 20:30:20 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <4A6F944D.6040909@omnilan.de> Date: Tue, 28 Jul 2009 20:30:18 -0700 Message-id: References: <4A344A9F.5020708@jrv.org> <4A344C67.8000101@jrv.org> <4A37C1A7.1070801@omnilan.de> <19563E0A-3A5A-4B0C-BB89-934A44CF4A82@mac.com> <4A6F944D.6040909@omnilan.de> To: Harald Schmalzbauer X-Mailer: Apple Mail (2.1074) Cc: FreeBSD Current Subject: Re: `gpart show` and secondary GPT header X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2009 03:30:21 -0000 On Jul 28, 2009, at 5:14 PM, Harald Schmalzbauer wrote: > Marcel Moolenaar schrieb am 16.06.2009 18:28 (localtime): >> On Jun 16, 2009, at 9:00 AM, Harald Schmalzbauer wrote: >>> Marcel Moolenaar schrieb am 2009-06-14 07:23 (localtime): >>> ... >>>>>>> Jun 13 06:31:42 bigback kernel: GEOM: ad12: the secondary GPT >>>>>>> table is >>>>>>> corrupt or invalid. >>>>>>> Jun 13 06:31:42 bigback kernel: GEOM: ad12: using the primary >>>>>>> only -- >>>>>>> recovery suggested. >>> >>> I'm curious what the correct way to recover is. >>> I also tried dd, but without success. >>> `gpt` had a recover functionality if I remember corretcly. >> Recovery is not yet implemented in gpart. That would be >> the correct way to recover. And yes, gpt(8) has recovery. >> Thus, gpt(8) is the right way to recover on -STABLE. > > Hello, I'd need some help. > I tried to recover the secondary GPT after overwriting on the same > disk. > I used 'dd if=/dev/ada0 iseek=1 count=1 oseek=1953525167 of=/dev/ada0' > I thought this must work since the location of the secondary, stored > in the GPT header, is correct. But it doesn't. The table is also duplicated. Thus, a few LBAs are different. This means the checksum is different. Consequently, you can't simply dd(8) to recover. FYI, -- Marcel Moolenaar xcllnt@mac.com