I would like to move my current installation of Ubuntu 11.10 to a bigger harddisk, since the old one is failing.
I would like to avoid solutions like dd block copying (since there would be unused space at the end) with something cleaner, but I'm open to suggestions.
Partitions info:
Size Used Avail Use% Mounted on Partition type Encrypted
19G 9.9G 7.6G 57% / ext4
59G 50G 6.2G 90% /home ext4 Yes
What is the best way to accomplish such a task, preferably with advantages/disadvantages of any given approach.
Use clonezilla.
It will allow you to clone your current system including the mbr without actually copying unused space that dd does hence doing it faster
Since its reading / writing on a filesystem level you can only use it on a supported filesystem, on the contrary to dd, which works on a device level, allowing the copy of any filesystem.
Clonezilla's front page has a list of the software's limitations:
I'd use Gparted.
Use blkid to check the UUID of the partitions on the new diskEdit your /etc/fstab located on your new disk according to your UUIDOpen a terminal (Ctrl + Alt + T) in order to re-install Grub on your new disk.
fdisk to Check the name of the Ubuntu partition on your new disk. In my case, it's sda1 so let's continue by mounting this partition :
Finally, let's re-install Grub in your new disk sda :
Shut down and re-start from your new disk !
[EDIT] Thanks to tomodachi, I edited my answer to reflect his advices :
No need to edit the fstab on the new HD because Gparted is supposed to copy the partition as well as its UUID
I added some extra steps to make your new HD bootable.
maybe there are simpler methods ?
For Complete detailed instructions, see Ubuntu How To's
1Source:Ubuntu How To's
You can also use redobackup, it makes a whole disk image, and will exactly image your current computer to the larger hard disk.
After you were done, you would want to expand your partition to fill the rest of the disk with gparted.
Redobackup is pretty intuitive.