From owner-freebsd-geom@FreeBSD.ORG Mon May 5 00:28:18 2014 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC1479C1 for ; Mon, 5 May 2014 00:28:18 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AED251285 for ; Mon, 5 May 2014 00:28:18 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s450SHXD036856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 May 2014 17:28:18 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s450SHmT036855; Sun, 4 May 2014 17:28:17 -0700 (PDT) (envelope-from jmg) Date: Sun, 4 May 2014 17:28:17 -0700 From: John-Mark Gurney To: Andrew Berg Subject: Re: Recreating a GPT Message-ID: <20140505002817.GO43976@funkthat.com> Mail-Followup-To: Andrew Berg , freebsd-geom@freebsd.org References: <5366CC63.4000001@my.hennepintech.edu> <5366DD86.8050005@my.hennepintech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5366DD86.8050005@my.hennepintech.edu> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sun, 04 May 2014 17:28:18 -0700 (PDT) Cc: freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 00:28:19 -0000 Andrew Berg wrote this message on Sun, May 04, 2014 at 19:38 -0500: > On 2014.05.04 18:21, Warren Block wrote: > > It will take a while to copy the disk with dd(1), but that's really the > > only safe way. Make a copy, and write the partition tables to that. > > > > gpart(8) only writes to the partition tables or bootcode, and should be > > safe for the data in the partitions, but the only way to guarantee that > > is on a copy, not the original. > I've already cloned the entire thing to the scratch drive. I'd just rather > not rewrite it in its entirety again. How much of the disk will I need to > rewrite to get the partition table back to its original state if my attempts > are unsuccessful? IIRC, bits are written to the end of the disk as well, > so I'm not sure how to do it with dd(1), though I'm sure it can be done. If you've already cloned everything to the scratch drive, just run the gpart commands on the scratch drive, and you should be able to just mount the fs's... most of these commands don't write to sectors they don't need to as that's just a waste of time/resources... > > gpart backup produces plain text that can be manually created. I'd > > still rather let gpart deal with the disk directly by using gpart create > > and add commands. > I'm under the assumption that 'gpart create' will do more than > 'gpart restore'; is that not correct? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."