behaviour after cloning a disk

J dreadpiratejeff at gmail.com
Wed Dec 21 23:45:14 UTC 2011


On Wed, Dec 21, 2011 at 17:26, Joep L. Blom <jlblom at neuroweave.nl> wrote:
> Hi,
> I have a question about the behaviour of a cloned disk.
> I want to copy a20GB disk to a partition on a much larger disk (1TB) of
> 20GB. The disk is bootable with 2 primary partitions (1=ntfs, 1=ext3) and an
> extendedn partition with 5 logical partitions (with different formats).
> If I copy that disk with "dd if=/dev/sdb of=/dev/sdd8 bs=1024" will all be
> preserved i.e. are all partitions the same as in the old disk and is the
> disk bootable ( and can grub find the bootable partitions automagically?).
> You can see I don't have much experience with this so I hope somebody with
> more experience can help me out.

Is there any particular reason you want to "clone" the disk using dd?

If you're only looking to preserve the files, wouldn't rsync work
better, or even cp? Both have means of protecting ownership and
permissions when copying files from one location to the next.

Also, your dd statement isn't quite right... if you're just trying to
copy the one partition, it would be:

dd if=/dev/sdbX of=/dev/sdd8

where X is the partition number of the 20GB partition you want to
copy.  Also, just wondering if specifying a 1024k blocksize is
necessary... dd will usually handle that automatically, unless there's
a reason for specifying a block size.

Anyway, just wondering... the important point is that, if you're just
interested in making copies of files, cp or rsync are probably safer
bets.




More information about the ubuntu-users mailing list