Dividing an existing Ubuntu installation on two physical drives
Solution 1:
Not tested, but I would do it in this way if the SSD is at least the same size or bigger than HDD:
Let's name the SSD as /dev/sda
and the HDD as /dev/sdb
for simplicity.
Steps:
-
Plug in the SSD and the HDD and boot a live Ubuntu from a bootable media (CD-ROM, pendrive)
-
issue this command in a terminal:
sudo dd if=/dev/sdb of=/dev/sda
-
when finished, mount
/dev/sda
and edit on it the/etc/fstab
file by adding:/dev/sdb1 /home ext4 noatime,nodiratime,defaults 0 2
-
Enter the
/home
directory of mounted/dev/sda
and erase everything there. -
Now comes the hard part: mount
/dev/sdb1
and erase everything except/home
directory. -
When cleaned, enter
/home
and move out the directories to the root of mounted/dev/sdb1
-
Erase the empty
/home
directory from/dev/sdb1
-
If
/dev/sda
was bigger than/dev/sdb
, usegparted
to resize the partition to fit the disk. -
Reboot from
/dev/sda
-
Enjoy.