gpart restore is different to gpart backup
wblock at wonkity.com
Wed Feb 5 17:08:20 UTC 2014
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.
> 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.
More information about the freebsd-questions