I'm trying to clone my HDD into an SSD, but I've hit a few snags. First off, I installed Ubuntu on an old MacBook Pro from 2012 and upgraded the RAM from 4GB to 8GB using parts from a different broken computer. It turns out that the broken computer had an SSD and the MacBook had an HDD, so I decided to swap them. I got a USB-SATA cable to help with the transfer. My hard drive is 500GB while the SSD is only 240GB. I read online that using the `dd` command won't work since the source is larger than the destination. I booted Ubuntu from a USB stick and used GParted to create a 220GB partition on my HDD, which should fit inside the SSD. Rebooted normally and everything was fine until I connected the SSD. I found I needed to create partitions on the SSD as well, so I set up two: sdc1 (2GB) and sdc2 (230GB), marking sdc1 as EFI with FAT32 and enabling the boot and esp flags. However, when I ran the `dd` command to clone from sda1 to sdc1 and from sda2 to sdc2, it cut off at 2.7GB with an out-of-space error. I also tried using `rsync` but ran into the same issue with insufficient space. I'm really out of ideas here and starting to wonder if the SSD is faulty. Any thoughts on what's going wrong? I'm open to suggestions!
3 Answers
You should use the `--one-file-system` or `-x` option with `rsync` to avoid crossing filesystem boundaries—it might help with your space issues. Also, double-check the total sizes to confirm you have enough space on the SSD. If you see errors in `dmesg`, it could be a sign that the SSD is failing. You can use `smartctl` to check the health of the SSD.
Have you thought about using Clonezilla? It’s a straightforward cloning solution and might simplify the process for you. Wouldn't hurt to give it a shot!
Just a tip: you often need a third drive to successfully clone one drive to another in Linux. You have to clone from a source drive to a target and use another drive for the OS. You can also check out some relevant forums; they might have some good ideas for your situation!

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures