Partitioning – How to Move Ubuntu Installation from One HDD to Another

partitioning

I currently have Ubuntu 10.04 server running on a portable HDD. Want to move it to internal sata HDD. I've got 3 partitions /, /home and swap. On the new HDD I plan to have different partition sizes. What's the correct way of doing these two things (move and resize)?

Best Answer

Clonezilla may be useful for cloning your hard disk, even for those situations on which you need to do it with different size disks as mentioned here: http://www.tuxradar.com/content/how-clone-hard-drives-clonezilla

enter image description here

Moving to a bigger disk

It's easy to ensure that a clone of a SCSI disk is restored to a SCSI disk, but you'll have a tough time finding an exact replica size-wise. The good news is you don't have to restore a disk on another disk of the same size. The even better news is that you can in fact restore the image to a much larger disk.

When restoring a disk, Clonezilla enables you to resize the filesystem and create partitions on the new disk proportionally. But even if you are moving to a bigger disk, you might prefer to keep the partitions as they are. In that case you can ask Clonezilla to create the partition table as its listed in the image.

There is documentation about moving to a larger disk as mentioned here but I am not sure that you can do it the opposite (cloning to a smaller disk).

However, it's worth to try. Clonezilla offers several Live CD's and bootable USB images and there is also documented that you can resize the free space on the disk after the copy, in which case the suggestion by @maniat1k to use gparted is also a good idea.

If you use clonezilla, I would appreciate if you drop comments with your experiences over here in order to have well documented how does this work for future reference.

Thank you a lot and Good luck!

Related Question