Cloning SATA SSD to NVMe SSD using dd

So I just cloned my old 250GB 850 Evo SSD to my new 480GB SX8200 SSD so that I wouldn’t have to mess around with reinstalling all my applications and whatnot. So I’m a little confused as to how I would have made my life a little easier.

Before I set out on this little adventure, I shrank my 850 Evo’s volume down to about 180GB, but when I used the dd command dd if=/dev/sda of=/dev/nvme0n1 in Linux, it cloned the drive just fine, but it also cloned the blank, unallocated 50-ish GB of empty space from the source. Before I started, I looked at my drives with fdiskand under my 850 Evo it didn’t show the empty 50-ish GB space, so I just assumed it wouldn’t bother copying it.

So my question as a novice Linux user, what could I have done to avoid copying over that empty space onto my new SSD and only bringing over the used 180GB from my source drive?

Either way, the cloning worked just fine and my WIndows install and programs are just how I left them. I know I could have used a program like Macrium Reflect to get the job done, but I didn’t have any of those currently downloaded, but I did have Mint on a bootable USB drive, so I thought it would be interesting / fun to try using that instead.

You cloned the entire device by using /dev/sda as the input file, you should use /dev/sdaX to clone just the given partition and not the entire drive. :grinning:

1 Like

Thanks for the insight! Would it have been bad to clone each partition on the source drive one by one? E.g clone /dev/sda1, let that finish, then tell it to clone /dev/sda2 and so on? Or would there be an easier way to go about that?

just cloning by partition you’ll miss the boot loader and the new drive wont boot… so you’d have to manually fix that

you could have used clonezilla also
Its a lot easier than dd and quite fast
they now have a network cloning option so you can clone to multiple machines at the same time.
but you have learned dd in terminal and that’s never a bad thing to learn!

this.

dd is a bit level clone where you basically just clone the 1’s and 0’s from one place to another.
this comes with the good and the bad, you get an EXACT copy on you target, including empty space, heck dd even transfers released by the filesystem space. meaning if you clone an entire harddrive, like in sda, you get a copy of the entire harddrive, on your target feks. nvmeX.
else clone /dev/sdaX partition, and reinstall grub which should do the trick. Or try Clonezilla, it has it’s quirks but makes your life alot easier.