From owner-freebsd-questions@FreeBSD.ORG Sun Jan 20 03:01:02 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EB03E538 for ; Sun, 20 Jan 2013 03:01:02 +0000 (UTC) (envelope-from erichsfreebsdlist@alogt.com) Received: from alogt.com (alogt.com [69.36.191.58]) by mx1.freebsd.org (Postfix) with ESMTP id 9F1F5D3E for ; Sun, 20 Jan 2013 03:01:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=OZfIUulM2wiuGKPt/NFVhezLXc524k/WsQ5c7oZCB9Q=; b=dJORMJQ8e59eoM/OSrp/0R66FqnMnZGveqPv3HrnbeeNyw7roTFn8gMdSgYjcv6HoyRleAtRu0+hq2hHWnamxzUqr0fTx34Q2UvCOH3r9HD0Sn5SUjFPQt8Blg0NEOIK; Received: from [122.129.203.50] (port=10016 helo=X220.ovitrap.com) by sl-508-2.slc.westdc.net with esmtpsa (SSLv3:DHE-RSA-AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1Twl9O-003ZUo-Bx; Sat, 19 Jan 2013 20:00:54 -0700 Date: Sun, 20 Jan 2013 08:17:46 +0700 From: Erich Dollansky To: Bob Willcox Subject: Re: Safe way to repair corrupted GPT partition table? Message-ID: <20130120081746.3ef4300b@X220.ovitrap.com> In-Reply-To: <20130119145907.GA7788@rancor.immure.com> References: <20130118200824.GA4084@rancor.immure.com> <20130119072509.2579dcce@X220.ovitrap.com> <20130119145907.GA7788@rancor.immure.com> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.6; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: Cc: questions list X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jan 2013 03:01:03 -0000 Hi, On Sat, 19 Jan 2013 08:59:07 -0600 Bob Willcox wrote: > On Sat, Jan 19, 2013 at 07:25:09AM +0700, Erich Dollansky wrote: > > Hi, > > > > On Fri, 18 Jan 2013 14:08:25 -0600 > > Bob Willcox wrote: > > > > > Is there a way to repair a GPT partition table that has gotten > > > corrupted (following a system hang during heavy I/O to a ZFS > > > filesystem)? > > > > > I would use a hex editor. Of course, try it out on another disk > > before working on that disk. You can even copy the data with dd > > from the other disk after you are sure it will work. Of course, the > > size must match or must be made matching. > > > > Ok, it is not a safe way but it is a working way. > > Have to say I was hoping that there was some programatic way to do > this. Certainly if I go down this path I'll have to practice on a > disk that doesn't contain data that I care about. Getting the size > right as this is the only disk of this size I have. (Actually, it's > an Areca RAID 5 Volume Set.) > this does not make it easier. What really helps is to copy first the first the data you want to edit to a file and work then with the copy of the file. This enables you to copy the original back as often as you need. Just make sure that you do not lose this copy. This will be the most important file of all your files. I used a normal thumb drive to play around before I went once to a hard disk. Ok, there is a bit of sweat on your fingers, but the rest will be ok. Erich