2

I installed Ubuntu on my HDD, there are two partitions on HDD: ~2TB with ext4 (sda1) format and 8GB for swap (sda2).

There are a lot of files in the /home directory but it is not separated. I did add a new SSD (sdb) into my PC.

How can I keep /home in HDD and move everything else into the new SSD?

distro: Ubuntu desktop 18.04.4 LTS (Gnome shell)
HDD Size: 2.0 TB (2,000,398,934,016 bytes)
/home directory on HDD size: 80GB

I'm not using any virtualization and hibernation.

Melebius
  • 11,431
  • 9
  • 52
  • 78

1 Answers1

2

There are several ways to achieve what you want but it’s always best to backup your data first.

Since you only have 80GB in your home directory I would be inclined to do the following:

  1. Shrink your system partition (including home) so it’s smaller than your SSD.
  2. Clone the HDD to the SSD and get it booting
  3. Delete the HDD partition and make a new partition on the HDD
  4. Copy the home directories to the new partition
  5. Sort out FSTAB so the new home is mounted and delete the old home

Ask or search here if you don’t know how to complete these steps

Melebius
  • 11,431
  • 9
  • 52
  • 78
PonJar
  • 1,868