Cloning from HDD to SSD with Terminal

1.Boot from HDD
2.View path of disk
#df -h
2.Create mount point
#mkdir -p /mnt/{hdd,ssd}
3.Mount SSD
#mount /dev/sdaX /mnt/hdd/
#mount /dev/sdcX /mnt/ssd/

4.Copy all file from HDD to SSD
#cp -a /mnt/hdd/ /mnt/ssd/
5.Mount bind partition
#mount -bind /dev/ /mnt/ssd/dev/
#mount -bind /dev/pts/ /mnt/ssd/dev/pts/
#mount -bind /sys/ /mnt/ssd/sys/
#mount -bind /proc/ /mnt/ssd/proc/
#chroot /media/ubuntu/root1/
6.Install GRUB
#grub-install /dev/sdcX --boot-directory=/boot/ --target=i386-pc
7.Update GRUB
#update-grub
8.Edit fstab to handle boot rescue
a.find UUID ssd
#blkid
b.copy ssd UUID to hdd UUID in /mnt/etc/fstab
#nano /mnt/etc/fstab
9.Reboot, done

Reference :
https://www.pcsuggest.com/hdd-to-ssd-cloning-linux/
https://medium.com/@nehamuthiyan/getting-out-of-the-emergency-mode-in-ubuntu-818180ce3940