I am trying to clone my whole Ubuntu OS to a new SSD. I was following This video. To check to which disk I had to clone, I ran the lsblk
command.
According to this, It seems that sda is my current HDD, and sdb is my current SSD. I then tried to run the following command: dd if =/dev/sda of=/dev/sdb
. But when I did this, it ran for a while and then gave me an error, that the sdb drive does not have sufficient memory. What I suspect has happened is that the dd command tried to clone my entire mounted volume on the HDD (So the whole 495GB, including empty space) to my 250GB SSD. This is not what I meant to do, so now my question is:
How do I clone my Ubuntu OS + relevant files, but not empty space to my new SSD?
(BTW I've already re-formatted my SSD after my failed attempt to clone)
First, please do not clone disks/images to SSDs using
dd
(regarding wear leveling, etc), especially when your source OS is running . I would recommend cloning your existing OS withCloneZilla
orSystem Rescue CD
. Both live systems offer good tools to solve your problem!