Copying Linux partition from an HDD to a SSD

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.

Tags:

Migration

Ssd