Ubuntu: Copying Linux partition from an HDD to a SSD


OK, I have a laptop with an HDD drive and I also have a SSD drive. I would like to replace the former with the latter without having to reinstall everything. What I found after a bit of research was to use a live disk + an external hard drive + gparted to copy the whole Linux partition (in two steps) and then edit fstab.

Now I guess when Linux is installed, it assesses computer's hardware and therefore adjusts some software parameters. So I'm afraid doing the above may 'fool' the OS and result in sub-optimal performance w.r.t. the SSD. I don't know if this is right.


When changing hardware, it's a good idea to worry about how the OS will react. For most things, you can just change the piece of hardware in the innards of your computer, then let Linux do it's magic.

Hard drives are a little different. You may copy all files, but still need to have boot instructions (grub) installed on your new drive. You also need to make sure that the identifier of your new drive matches the old one (or some drivers will be lost at sea).

Once the UUID is changed, you boot through a live-cd, copy all your precious files on your SSD, and chroot on you new drive to create the bootloader (grub).

I was going to go in details on how to do such things, but while doing a little research on the topic, I found this: http://blog.oaktreepeak.com/2012/03/move_your_linux_installation_t.html

That being said, is it a good idea? Ideally, you should reinstall from scratch. It would give the opportunity to clean all the broken files that on your drive. If you really don't want to lose your settings for all different applications, make sure you copy all hidden files in your home folder, and transfer them to your new install. If you migrate from one distro to another with the same packages, it will be no issue.

However, if time is a constraint, copying from one hard drive to another is fine, as long as you set all references from your old hard drive "pointed at" the new one. As with anything, it does have a chance to fail, but if you make backups, there is no problem with copying a drive onto another.


Linux is not windows. You don't really need to worry about such things. You can just create a raw partition using dd. And after fixing UUIDs you should be just fine.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »