0

I'm not versed in Linux/Ubuntu and received a support request from a client. He stored his /home directory into a separate partition (sda5) so that he could mount it as his /home directory after upgrading to a new version of Ubuntu. He has updated from Ubuntu 14.04 to 16.04, and can mount his /home (sda5) directory to /home as desired, but after doing so, cannot log back into his Ubuntu account after logging out. Should he re-install Ubuntu 16.04 using different install options? Here is his direct quote:

I have been using Ubuntu 14.04 and want to upgrade to 16.04. I have a separate partition for where ubuntu goes ('/') and where my home folder goes ('/home') so that when I install a new version of ubuntu I shouldn't have to wipe all of the things in my /home directory. But when I tried to install Ubuntu 16.04 I got stuck in an infinite login loop if I mounted /home to my /home partition (sda5). I tried installing Ubuntu 16.04 without mounting /home to my separate partition and everything seems to work great and once logged in I can mount my home partition anywhere. But if I mount my home partition to /home then things still work fine until I log out - then I can't login again. I just want to be able to have my /home partition (sda5) mounted to /home and I would like to be able to log in and out, but I can't figure out how to do that...

I found this Ask Ubuntu post, where the first answer explains how to log back in as root and mount the old /home directory so he can log back into his account. At first, the second answer on the same post seemed promising. But after reading through it, it appears to be a guide on backing up your current /home directory to a new partition, which my client has already done. Now he just wants to map his backup /home directory to his current /home directory.

(I apoligize if I used incorrect terminology anywhere)

EDIT: I found this post, which says to click on the "Format" tick box for the root (/) during Ubuntu installation, but to not tick the "Format" box for /home. Is that all he would need to do to retain his old /home folder?

velkoon
  • 101
  • Yes, you can reinstall a brand-new ubuntu without need to format or lose home partition. You can attach your sda5 after that, just editing /etc/fstab with the correct UUID from sda5... But you have to take careful to chown 1000-user /home/folder to the user you created when you installed your SO, or you will not login nor have a saved session after logout. – Redbob Aug 30 '17 at 01:37
  • Can he log in as root in a tty (not sudo or su) and run umount /home; ls /home; mount /dev/sda5 /home; ls /home? I suspect at least some of the users have their home directories under /home of the root filesystem instead the home filesystem (root tree of sda5). – Tom Yan Aug 30 '17 at 05:01
  • I suspect damage to the user's home directory. If so, it should be possible to rename that directory (say, sudo mv /home/fred /home/fred-old), create a new home directory, set ownership and permissions on it, and then everything should be OK, with the caveat that the user will have to cd into the old directory to access files. If this works, moving files from the old home directory to the new one should be possible. The problem with this approach is that user program settings will be lost unless their files are moved -- but one of them is likely the cause of the problem, so be cautious! – Rod Smith Aug 30 '17 at 13:39

0 Answers0