I should start off by saying that I’m a complete noob when it comes to dd, so please forgive me if there’s an obvious answer to any of my questions.
I have two disks, we’ll call them HDD and SSD. HDD has a working Windows 10 install on where as SSD used to have a working Windows 10 install on but it’s partitions were either damaged or were improperly deleted. I’d like to see if I can recover any data from the SSD (just for the hell of it) but I need to use the SSD for something else in the next few days (installing Manjaro). So I’ve been trying to create a dd image of the entire SSD to a .img.gz file, in a folder on the HDD. I should note that I don’t really care about any of the data on either the SSD or HDD.
I’ve been using a Linux Live USB to boot the system and run the following dd commands.
sudo dd if=/dev/sdb conv=sync,noerror bs=64K | gzip -c > /media/ubuntu/Windows/Users/HanSolo/Image/SSDbackup.img.gz status=progress
The above failed to function with the “status=progress” option but I did get it to run without the option and it created a ~23GB image of what is a 240GB SSD. Thinking that the command might have been interrupted when the system turned the display off and locked the desktop, I ran the command again… twice in fact. But I made the mistake of using different destination disks for each image (more on this in a moment). Each time, I got a ~23GB file but all three files were slightly different in size and had md5sums that didn’t match.
I did have to reboot the system between making the last two images (due to an issue with stupid Windows and the fact it doesn’t actually fully shutdown unless you hold the Shift key when you click the power icon). And in order to rule out the hashes being different becasue something had modified the SSD, I then made sure that swap was disabled, I double checked that the SSD wasn’t and could not be auto mounted before then creating another two images, this time with the same name, to the same disk but in separate folders so as to eliminate as many variables as I could think of (such as each destination disk having different block sizes).
Same results… similar but not identical files sizes and checksums that don’t match.
At his point, I did something that was kind of dumb… I modified the command without being 100% what I was doing but neither the SSD or HDD contain data I care about in the slightest, so I figured what the hell.
sudo dd if=/dev/sdb of=/media/ubuntu/Windows/Users/HanSolo/Image/SSDbackup.img.gz status=progress
This resulted in a ~240GB image. I also ran this command twice, using to different destinations but again, the hashes don’t match.
Now I’ve got through the wall of text, here are my questions.
Would the first command create a block for block copy of the entire disk?
If it does, then how can the files be so much smaller (am I wrong thinking that a raw disk image wouldn’t be that compressible)?
Why do non of the hashes match?
Why am I wasting time dd’ing and checksumming 240GB image files, of a disk I don’t give a funk about when I could be doing something more productive?