>>I've successfully cloned hard disks containing DOS and Linux partitions using a
>>DOS program reading tracks under DOS over the network - the result assumes no
>>bad blocks, and requires any individual files (e.g. its own IP number) to then
>>be editted. But is darned fast, and you know that there can be no virus or
>>whatever left after it! If anybody is interested in the programs at each end
>>(they are darned simple!) let me know.
>the program dd should do the same thing. It is also fast, probably faster.
>I guess cat should also do the same thing, clone an entire disk or partition.
>Again, bad blocks and such will bit, but who cares with modern disks.
>(dd if=/dev/sda of=/dev/sdb) Just dont get the order wrong, otherwise you
>will wind up with a very blank disk and you will probably be very unhappy.
I had to duplicate a lot of 540M IDE disks for the Beowulf cluster, so I got
a chance to experiment. Under Linux there is essentially no performance
difference between the following commands:
cp /dev/hda /dev/hdb
cat /dev/hda > /dev/hdb
dd if=/dev/hda of=/dev/hdb
I did most subsequent tests with the 'cp' version, since they ugly 'dd'
syntax reminds me of PIP.
This kind of copy is only safe with IDE disks that are configured for the
same virtual C/H/S (cylinder/...) parameters. It works because the IDE
interface presents a perfect virtual disk. Bad blocks are transparently
mapped to blocks reserved for this purpose. If your non-IDE (e.g. ST506,
MFM, SCSI) disk interface doesn't hide bad blocks it won't work. If the
C/H/S values are different your partition table and filesystems info will be
The disks were Maxtor 7546AT 521MB IDE disks with 256K cache.
The controllers were generic $25 ones -- DTC 2278VL w/ a DTC805 IDE chip.
The baseline 1.0.* kernel took about 30 minutes to copy 540M between disks.
The biggest improvents came from changing to a 1.1.* kernel with Mark Lord's
changes, which dropped the time down to about 9 minutes.
Further improvements came from Mark Lord 'hdparm' program to turn on
multiple sector reads and writes. This dropped the copy time down to about
6 minutes, an average rate of 3MB/sec.
USRA-CESDIS, Center of Excellence in Space Data and Information Sciences.
Code 930.5, Goddard Space Flight Center, Greenbelt, MD. 20771