Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jun 2020 17:00:07 -0700
From:      "Ronald F. Guilmette" <rfg@tristatelogic.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Makin' backups -- questions
Message-ID:  <94012.1592006407@segfault.tristatelogic.com>
In-Reply-To: <9e3e8b2b-7ec2-a329-2ec0-6d90bea03d27@holgerdanske.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <9e3e8b2b-7ec2-a329-2ec0-6d90bea03d27@holgerdanske.com>, 
David Christensen <dpchrist@holgerdanske.com> wrote:

>> I converted all of my own drives to GPT some time ago now, and I have
>> never experienced any special issues or problems as a result of that
>> change-over.  So I am still puzzled by your assertion that GPT can be
>> in some way(s) more problematic that MBR.
>
>If I use dd(1) to copy all of the blocks of a system disc with MBR 
>partitioning to another device with a different (but sufficient) number 
>of blocks. the target device will be laid out correctly, the partition, 
>slice, and/or filesystem contents will be correct, and the disc work as 
>a system disc.  I have done this countless times.
>
>
>If I use dd(1) to copy all of the blocks of a system disc with GPT 
>partitioning to another device with a different (but sufficient) number 
>of blocks, the target device primary GPT table and partition, slice, 
>and/or filesystem contents will be correct, but the secondary GPT table 
>either will be in the wrong location (destination has more blocks) or 
>will be missing (destination has fewer blocks).  My guess is that the 
>disc would still work as a system disc (?), but I would need to fix the 
>secondary GPT table.

This reminds me of this old doctor joke...

    PATIENT:  Doctor!  Doctor!  It hurts when I do this!

    DOCTOR:  Don't do that.

But seriously, I have found that copying whole partitions is often easiest
using the Linux gparted tool.  DD is quite obviously an -extremely- low
level tool, and rather ham-fisted.  Clonezilla can also copy individual
partitions.  Me personally?  I wouldn't use DD except to copy -everything-
between two drives having exactly the same number of sectors.  Note that
if you use DD to copy from a smaller drive to a bigger drive, then afterwards
the BIOS and everything else will tell you that the destination drive's
physical size is -smaller- than it actually is, i.e. exactly equal to the
size of the (smaller) source drive.

Yet another reason not to use DD to copy either whole disks or partitions...
unless the size of the destination is -exactly- equal to that of the source.


Regards,
rfg



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