[wplug] dd

Jonathan S Billings billings at negate.org
Thu Feb 17 12:42:12 EST 2005


Bob Supansic wrote:
> Two methods were suggested for replicating a hard drive:
> 
> 1. dd id=/dev/hdb od=/dev/hdc -possibly -other -arguments'
> 
> 2. partition the new disk as needed, use mkfs to create the
> desired filesystems, and use "cp -a".  Or use tar or cpio.

NEVER use 'cp -a' to copy system data to a new partition.  You'll lose 
all the metadata on the files and directories, such as permissions, 
ownership, timestamps and other bits.  The resulting OS will be useless. 
  Use tar, cpio, dump/restore/, rsync or some other backup software. 
'cp' is for copying a couple files around, not for backups or disk cloning.

> 
> Do either or both of these methods produce:
> 
> 1. a Linux-bootable hard drive.

'dd' will create a bootable hard drive as long as the boot blocks are 
copied as well.  For the amount of time 'dd' runs, it might be easier to 
use a more efficent piece of software then have lilo or grub install on 
the new disk to create the appropriate bootloader.

> 2. a Windows-bootable hard drive.

I've used 'dd' to produce a bootable windows parition, and I've used 
'dd' to make a windows partition that bluescreens.  If it's an identical 
disk (same vendor and model number) you're copying to, then 'dd' should 
work just fine.

I don't know of any linux-based windows cloning software that works like 
tar or dump/restore.

-- 
Jonathan S. Billings <billings at negate.org>


More information about the wplug mailing list