0

I have an SSD (sdb1 EFI, sdb2 Swap, sdb3 Linux system) and an HD (sda) on my computer that runs Ubuntu 20.04.2 LTS.

Currently the home folder is on the HD (sda1), but I will remove this HD from the computer. So I want to create in sdb3 (where the system is already) a home folder and my user directory.

But I don't want to move the content from the old home to the new one. I just want a new home on sdb3 with an empty user directory, with only the files that are initially copied from /etc/skel. A really "new home".

My fstab is like:

# / was on /dev/sdb3 during installation

UUID=5c1610a7-d461-4df3-bc33-eab480b18ccb /

/home was on /dev/sda1 during installation

UUID=ad2befb3-0105-4693-8a5f-4fda78565101 /home

I think (I'm really not sure) that if I simply remove /home lines from fstab and remove the HD (sda) from the computer, in the next boot, the system will look for /home inside / at sdb3 - but there will be no user directory. Am I wrong?

Lorenz Keel
  • 9,511

1 Answers1

1

Do this from a live session:

  • Remove the entry in your fstab file (beware, in the live session this is not /etc/fstab, but the file fstab in the folder etc on the partition where your installed system resides), so your separate home partition will not anymore be mounted to /home.
  • Create a new home folder for your user in the folder /home, and change the owner and group to the user.

After reboot and when you log in, this new home folder will be initialized.

vanadium
  • 97,564