Ubuntu Live CD/USB
A new HD/SSD at lease equal to the size of the original HD/SSD
Plug in the USB/CD and the new SSD. Boot the system, adjust the BIOS setting and move the the live USB up to the top. After restart, select “Try Ubuntu”. After login, open one terminal window and use lsblk to locate the current system.
Now, open gparted in the applications list or type sudo gparted in the terminal window. Assuming the new SSD is empty, we can now copy the partitions on the old SSD/HD to new SSD/HD by:
Select the old SSD/HD from the drop down menu on the right.
Right the partitions you want to copy and select copy from the menu.
Select the new SSD/HD from the drop down menu on the right. Right click the unallocated partition in the bar and select paste.
Repeat this process until all the partition you want are copied. (It can take fairly long depending on how big those partitions are)
For me, I have boot/efi and /recovery partitions on the original SSD to support my dual boot windows. So I also copy them to the new drive. I have a cryped swap partition on the old drive and I copy that one too.
Next thing to do is to modify the UUID listed on the /etc/fstab. Since the UUID of the system partition on the new drive is diffrent from the original, we need to rectify this so we can load the system from the new SSD/HD.
Type in blkid in terminal. A list of partitions and their UUIDs will show in the screen. This can also be done by right click the partiton in gparted.
Open the /etc/fstab, there is a partition mounted to /. Modify its UUID so it is the UUID of the new partition. Save the change and reboot. You should be able to login to the system on the new drive.
I have a crypted swap partition on the old drive and I did copy that one over to the new drive. Every time before I log-in the ubuntu, I have to type in the password. This bothers me a lot. So, I remove that swap partition and re-create one. Here are few steps I made after creating the new swap partition.
sudo mkswap /dev/the_swap_partition
A new UUID shows on the screen
Update the swap partition in the fstab
Reboot. The swap should be automatically mounted. No more password typing for the swap partition.