0

I managed to break my system, so I would like to do a full 16.04LTS reinstall (wiping the whole /), while keeping my /home. The /home is on a separate partition.

I looked around here, and I saw it recommended to simply do a custom install and tick the /home partition as do-not-format, but there were some comments saying that they lost their /home that way, which makes me confused.

Also, when during the installation, I create the first user account, which will have same name as before, and therefore path to his home will be to an already existing location on my /home partition (/home/username), I am scared that this will wipe the partition and even if it doesn't, the user won't have the rights to access the directory since it belongs to "someone else" which will probably break things.

So, how can I do a full Ubuntu reinstall, while using my existing /home partition with the ability to re-add users I had on the old installation, and making sure they use their already existing home directories, just as they did before the reinstall.

I cannot format the /home partition and then copy the user data back there, because the data there are simply too big and I have nowhere to back them up.

Thank you.

Askerman
  • 826
  • On the partition & existing OSes part of the installation you can format the system partition and select the mount point for the /home partition and uncheck the format option for it, but I'm not sure for regaining access for the old user accounts. – na-no. Oct 21 '17 at 11:05
  • After reinstall (and not formatting the /home partition), you can use the "adduser" command to re-add your users. The "adduser" command has options that will be handy for you:

    --no-create-home - Do not create the home directory,

    --uid ID - Force the new userid to be the given number,

    --gid ID - put the user in that group.

    – John Anderson Oct 21 '17 at 16:52

0 Answers0