I am running an Ubuntu 14.04 LTS and I experienced some issues with my hard drive. I bought a new HDD of the same size (1TB), and I intend to move all my data (softs, work, pics, etc.) on the new HDD.
What is the easiest way to do that?
I am running an Ubuntu 14.04 LTS and I experienced some issues with my hard drive. I bought a new HDD of the same size (1TB), and I intend to move all my data (softs, work, pics, etc.) on the new HDD.
What is the easiest way to do that?
The easiest way to do this is by using Gparted from Live CD/USB as suggested above. To do this have a look at the "Copying and pasting a partition" section in the Gparted manual. To reproduce the steps given in the link:
To copy a partition:
Select an unmounted partition. See the section called “Selecting a Partition”.
Choose: Partition → Copy. The application marks the partition as the source partition.
To Paste a partition:
Select an unallocated space on a disk device. See the section called “Selecting Unallocated Space”.
Choose: Partition → Paste. The application displays the Paste /path-to-partition dialog.
If you want you can adjust the size and location of the partition. See the section called “Specifying Partition Size and Location”.
If you want you can specify the alignment of partition. See the section called “Specifying Partition Alignment”.
Click Paste. The application displays the copy partition operation in the Pending Operations pane.
Boot from a live system, plug in the new HDD via USB (or another (s)ata cable, depending on your hardware), and start a 'Terminal'.
Check what is the path for your old HDD (probably /dev/sda), and the new one as well (/dev/sdb), and issue this command:
sudo dd if=/dev/sda of=/dev/sdb status=progress
Note that it will take a long time. You can monitor the progress on the terminal.
Another possibility is (even faster than dd):
cat /dev/sda >/dev/sdb
I created a bash script to automate this whole cloning process to another disk using rsync in the easiest way possible.
The script takes care of everything like changing fstab file, installing the proper grub in your new disk and updating it to create a new grub menu.
You just have to prepare your target disk with the appropriate partitions using gparted for example.
For more details, please visit its repository at https://github.com/thiggy01/clone-ubuntu