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
  • 8,905
  • Does this solution answer your question? – matigo May 29 '21 at 14:43
  • 1
    Does this answer your question? Move home folder to second drive – graham May 29 '21 at 14:51
  • Thanks for the links. The problem I'm facing is that in my "/" there is a "/home" pointing to sda1. So I cannot create a new "/home" folder and user directory pointing to sdb3. 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'm afraid of just remove /home lines in FSTAB and remove the HD (sda). I think that, by default, the system will look for home on / but there will be no user. What happens? – Antônio Olinto Ávila da Silva May 29 '21 at 15:37

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
  • 88,010