Tool for semi-cloning a hard drive: recommendations?

John Summerfield debian at
Fri Jan 11 22:44:19 UTC 2008

Phil Meyer wrote:

> No worries, I know about getting old. :)
> Remember, dd originally meant 'disk duplicator'.
> There has been much discussion here recently about what dd can and 
> cannot do.
> Maybe I can sum up. :)
> 1. Target drive cannot be smaller than the source drive, period.
> 2. inode and/or other fs related resources will be sized to the old drive.
> This is only problematic when going to a much larger drive, or when the 
> drive contains mostly small files.

I expect resize2fs and equivalents fix that.

> 3. udev/hal/+friends do not like foreign disk drives, and will duplicate 
> some devices, causing new eth, sd and other devices.  It is fine, and 
> does mostly the right things, but may come as a surprise.  Windows 
> almost NEVER works from a cloned drive, sorry.  For Windows, you really 
> need a backup or 'ghost' type program.

I regularly copy Windows XP and Windows Server disks using Linux and 
changing size, sometimes smaller, sometimes larger; Knoppix is my 
preferred tool. I never have a problem, except when I do something stupid.

> 4. Moving a 'cloned' bootable drive to another host does not guarantee 
> it will be bootable on the new host.  A rescue on the new host may still 
> be necessary to reinstall grub.
> 5.  Trying to 'use' a cloned drive on the original host while the 
> original drive is present  is problematic due to the way Fedora mounts 
> partitions by LABEL.  Other Linuxen use the hard drive id (UUID, I 
> think) just for this purpose.

I suspect that's imperfect too, but I've not put it to the test.

> Those are the CAVEATS that come to mind, but with a bit of care, cloning 
> with dd works just fine for ufs (Solaris) ext3/reiser, etc.
> One last thing:  its best to use a proper bs (block size) argument for 
> dd so the sector boundaries will be honored.  On drives with multiple fs 
> types, you may need to punt back to the lowest common denominator which 
> is likely 1k.  Using block writes instead of single byte writes is also 
> a bit faster.

dd always copies every last byte. Use of bs to copy larger chunks is 
good, it can speed the operation (particularly when source and target 
are the same drive).



-- spambait
1aaaaaaa at  Z1aaaaaaa at
-- Advice

You cannot reply off-list:-)

More information about the users mailing list