Clone a Hard Drive
Introduction
To clone a disk under Windows, you need to pull out all the tools, and if it’s bootable, then hold on tight… how much does it cost? Obviously, Windows purist pirates will tell me they download a cracked version.
Why use such tools and break the law when free and amazing tools exist? Let’s take a look at some options…
Solutions
dd
dd is the ultimate solution. To duplicate a disk with a progress bar:
|
|
Here I’m copying a 500g hard drive. For those who don’t want to use the bar command:
|
|
To clone a disk remotely:
|
|
The Partition Table
- Method 1
You can, if you wish, simply back up the partition table / MBR (sector 0):
|
|
Then to restore:
|
|
- Method 2
Here’s another method to save the partition table:
|
|
And to restore it:
|
|
Across the Network
Netcat
On the target machine:
|
|
On the source server:
|
|
SSH
To do a dd via SSH:
|
|
Cat
Here’s the simplest solution for copying an entire disk (partitions, boot sectors…):
|
|
hdx: the source disk
hdy: the destination disk
Partimage
There’s the wonderful Part image software which also allows cloning and even over the network into a disk image :-)
Verifying Disk Integrity
Once the disk is cloned, it’s best to check the integrity of its data (force a check disk at reboot), for example, in ext3:
|
|
Then restart the machine and at the next boot, it will force the check. After that, you can use it without issues.
CloneZilla
CloneZilla works a bit like Symantec (Norton) Ghost, it allows you to have a server and create copies over the network:
Back Up Restore Hard Drives And Partitions With CloneZilla Live
Last updated 07 May 2013, 09:10 CEST.