norberto

How to compare two partitions?

5 posts in this topic

Hi,

I cloned an hard drive, partition-by-partition, onto another hard drive, by using Norton Ghost.

Although it isn't likely that Ghost didn't clone the data properly, I want to double check it by comparing the content of each partition.

So what I would like to ask is if there's any easy way to compare two partitions in order to verify if their content is identical.

Best regards.

Share this post


Link to post
Share on other sites

I'm a big fan of QuickSFV. The latest versions can generate and verify md5 hashes as well.

QuickSFV webpage

In the late nineties I once had the pleasant experience of data getting corrupted when sent over the network, thanks to a faulty network card, a buggy chipset (broken DMA support) and memory errors. Since then I checksum every large file transfer I do. Makes you sleep better at night.

JD

Share this post


Link to post
Share on other sites

I'm not sure if QuickSFV works on entire partitions. If Ghost does a byte by byte replica (doesn't just copy filesystem information), then you can verify it using a Linux live CD and compared the MD5 sums (or sha1 or whatever) of each partition or even hard drive.

Share this post


Link to post
Share on other sites

By default, Ghost images file-by-file, so any byte-wise comparisons of the partions in question will inevitably fail.

I use WinDiff, it's a program that can recursively do a binary file-compare across directories. It's included free with various MS programming languages. I haven't checked, but it's probably bundled with MS's free compiliers.

Like you, I like to be doubly-sure that my data has been transferred correctly.

Share this post


Link to post
Share on other sites
I'm not sure if QuickSFV works on entire partitions.

You can't do that anyway with a booted OS... Many files will have changed (logs etc.) or be locked, so it's pointless. QuickSFV (maybe WinDiff as well, never used it) let you select the directories you're interested in and make checksums of them. Just don't select the "Recycled" or "System Volume Information" directories, it's won't work (and it's pointless anyway).

If you *really* want to be sure, the only foulproof method is checksumming a non-live partition:

- boot a "Live Linux" cd (e.g. Knoppix) and open a root terminal session (easiest is to type "knoppix 2" at the Knoppix boot prompt)

- mount your partitions (e.g. "mount -o ro /media/hda1" for a read-only mount of the first partition of the primary master hard disk, /media/hdb1) for the first partition of the primary slave etc.)

- create checksums of the original partition: e.g. "cd /media/hda1; find . -type f -exec md5sum '{}' >>/tmp/hda1checksums.md5 \;"

- use these checksums to verify the new partition: "cd /media/hdb1; md5sum -c /tmp/hda1checksums.md5 && echo Everything OK!"

If you don't see "Everything OK!" at the end of the verification, you should have seen the corrupt filenames passing by.

Regs,

JD

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now