copied an NTFS partition to a new SSD with GParted, but md5sum doesn't match
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
copied an NTFS partition to a new SSD with GParted, but md5sum doesn't match
hi guys,
i have a HDD with just 1 partition. an NTFS partition. i copied it to a new SSD using GParted.
i wanted to be sure that it was copied correctly so i ran:
sudo md5sum /dev/sda1
437f43e544484a5508416c6d0f23cae0 /dev/sda1
sudo md5sum /dev/sdc1
3e2fbfd84c4f5c2f6ca6ad692bf7482a /dev/sdc1
(where "/dev/sda1" new partition on the SSD in GParted "/dev/sdc1" is the original partition on the HDD)
the md5 hashes don't match. i checked twice, but the result was exactly the same 2 differing hashes. both partitions have their first sector at 2048.
- the data is supposed to be identical right?
- is there a way i can diff them and then patch the partition on the new SSD?
gparted would have mkfs'd the new partition then copied the data. Which would have, at a minimum, defragmented files. The on-disk representation would no longer be the same, although the data should be.
Only way to be sure would be to hash each file individually I would reckon. If you had copied them yourself would you also do a hash check of the partitions ?. I never have.
oh. that makes sense. i didn't know it made an empty file system. i first tried it in virtualbox on the partition of a fresh installation of windows 7 where the hashes did match. i guess i will just do it for a select few files. i like to double check things.
gparted would have mkfs'd the new partition then copied the data.
No, it copies the entire filesystem structure, preserving all the metadata. Files in the copy will have the same inode numbers as in the source, and will be located in the same filesystem blocks. What gparted does not do is copy the free space, so unless the free space in the source has been zeroed and the destination partition has also been zeroed, the md5sums will not match.
Here's a sample mapping of a file in the source and destination filesystems. The two filesystems have different starting LBAs, but the offsets and fragmentation are identical.
i just dd'd a complete micro sdcard (not a partition!) to my computer, and later back on the card again.
it worked.
i guess the checksums would match (due to hardware restrictions i can't check now).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.