Personally I would either grow the /dev/sdb1
partition on the 1TB disk into the unallocated space, making lot of room. Alternatively, just create another partition as /dev/sdb2
if you don't want to grow /dev/sdb1
.
Then boot Clonezilla on a USB stick, which is exactly the tool for this job, way better and more reliable than using dd
.
Use clonezilla to copy your entire 240GB SSD into a bunch of image files in a folder on /dev/sdb1
(or /dev/sdb2
if you chose to create a new partition). Clonezilla will put the files exactly where you tell it, so you can be confident that it won't destroy data on your 1TB disk, if you choose to do a "Disk to Image" type of clone.
Once complete and verified (clonezilla has a built in option for verification), you can swap out the 240GB SSD for the new one. Then boot clonezilla again, and use the "Image to disk" option to splat the backup you made onto the new disk.
You may then need to "grow" the partitions on the new disk, as I don't believe clonezilla does that automatically.
Once you're happy with the clone, you can throw away the image backup on the /dev/sdb2
(or /dev/sdb1
) and you're done.
I made a video about clonezilla a few years ago, which may help you understand how it works.
https://www.youtube.com/watch?v=YxWmizuVl-g