From owner-freebsd-geom@FreeBSD.ORG Sun May 4 23:38:47 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 20AC71F0 for ; Sun, 4 May 2014 23:38:47 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1blp0184.outbound.protection.outlook.com [207.46.163.184]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6C581DB3 for ; Sun, 4 May 2014 23:38:45 +0000 (UTC) Received: from [IPv6:2601:2:4780:2fd:8875:75fe:c2a7:77e7] (2601:2:4780:2fd:8875:75fe:c2a7:77e7) by BLUPR03MB018.namprd03.prod.outlook.com (10.255.208.40) with Microsoft SMTP Server (TLS) id 15.0.934.12; Sun, 4 May 2014 23:38:36 +0000 Message-ID: <5366DD86.8050005@my.hennepintech.edu> Date: Sun, 4 May 2014 19:38:30 -0500 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Subject: Re: Recreating a GPT References: <5366CC63.4000001@my.hennepintech.edu> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [2601:2:4780:2fd:8875:75fe:c2a7:77e7] X-ClientProxiedBy: BY2PR03CA052.namprd03.prod.outlook.com (10.141.249.25) To BLUPR03MB018.namprd03.prod.outlook.com (10.255.208.40) X-Forefront-PRVS: 02015246A9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009001)(6009001)(428001)(24454002)(199002)(189002)(51704005)(83072002)(85852003)(99396002)(31966008)(59896001)(33656001)(86362001)(74662001)(92566001)(4396001)(80976001)(83322001)(50466002)(75432001)(64706001)(77982001)(76176999)(46102001)(81542001)(54356999)(65816999)(50986999)(101416001)(81342001)(21056001)(74502001)(80022001)(20776003)(87976001)(23676002)(47776003)(83506001)(92726001)(76482001)(42186004)(3826001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB018; H:[IPv6:2601:2:4780:2fd:8875:75fe:c2a7:77e7]; FPR:; MLV:sfv; PTR:InfoNoRecords; A:0; MX:1; LANG:en; Received-SPF: None (: my.HennepinTech.edu does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=aberg010@my.HennepinTech.edu; X-OriginatorOrg: my.hennepintech.edu 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: Sun, 04 May 2014 23:38:47 -0000 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. > 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?