1

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.

  • 1
    @k7aay, thanks. I checked this, As I said I want to keep my /home on HDD. – Cham Lake Feb 18 at 19:52
  • Thank you but the swap is not the matter, I want to move everything except /home from 2TB HDD to a new 240GB SSD to speedup my PC. – Cham Lake Feb 18 at 20:02
  • What's the total of file space on the 2TB HDD now, less the file space used by /home ? Please answer with edit and please don't answer with Add Comment. – K7AAY Feb 18 at 21:06
  • But home and all of Ubuntu also fit on the new SSD? – WinEunuuchs2Unix Feb 19 at 23:06
  • Does this answer your question? Move home folder to second drive – dessert Feb 23 at 10:06
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

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.