Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 2014 10:08:17 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        Chris Whitehouse <cwhiteh@onetel.com>
Cc:        User Questions <freebsd-questions@freebsd.org>
Subject:   Re: gpart restore is different to gpart backup
Message-ID:  <alpine.BSF.2.00.1402050950080.48529@wonkity.com>
In-Reply-To: <52F269BE.3070904@onetel.com>
References:  <52F127C2.4050201@onetel.com> <alpine.BSF.2.00.1402041147500.38916@wonkity.com> <52F269BE.3070904@onetel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1402050950080.48529>