From owner-freebsd-questions@FreeBSD.ORG Wed Feb 5 17:08:20 2014 Return-Path: Delivered-To: freebsd-questions@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 7352A845 for ; Wed, 5 Feb 2014 17:08:20 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 01EB910D0 for ; Wed, 5 Feb 2014 17:08:19 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.7/8.14.7) with ESMTP id s15H8IVt048972; Wed, 5 Feb 2014 10:08:18 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.7/8.14.7/Submit) with ESMTP id s15H8I5C048969; Wed, 5 Feb 2014 10:08:18 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Wed, 5 Feb 2014 10:08:17 -0700 (MST) From: Warren Block To: Chris Whitehouse Subject: Re: gpart restore is different to gpart backup In-Reply-To: <52F269BE.3070904@onetel.com> Message-ID: References: <52F127C2.4050201@onetel.com> <52F269BE.3070904@onetel.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Wed, 05 Feb 2014 10:08:18 -0700 (MST) Cc: User Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Feb 2014 17:08:20 -0000 On Wed, 5 Feb 2014, Chris Whitehouse wrote: > After dd'ing the MBR from the original disk to the new one gpart shows no > info, fdisk sees the partitions. Possibly due to GEOM not creating a device when the MBR is invalid, but I don't know. gpart has a resize command, maybe there is a way to get that to resize that too-large partition at the end of the table to fit. > fdisk -u to change the size of the last > partition and rewrite the partition table, then gpart sees them. Also > clonezilla now sees them as the correct size. So looks like gpart doesn't > deal properly with mbr partitions? It is more a problem of FreeBSD routines insisting on standards that have been widely relaxed or ignored elsewhere. There are good reasons we should relax these standards, or at least allow gpart to override them on MBR with the -a and -b settings. > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/169542 > > I'll update the PR and put a link to this mail. > > Last question - is there an invocation of dd which will read the last block > of a disk without my calculating disk size and block size, then write that > block to another disk? I thought I'd seen something like count=-1 but I can't > find it in the man page. It should be seek=-1. Would be really handy, but as far as I know our dd does not have that. Possibly a GNU version has that feature.