0

When I initially installed Ubuntu a couple years ago (12.04), I was dual-booting and made the mistake of moving my home directory to an NTFS partition. I later discovered this was why pulseaudio didn't work, so I had no sound. Everything else worked fine, though, so I never messed with it.

I've since upgraded to 14.10 and decided it was time to fix the sound. The home folder contains way too much stuff to fit on my ext4 partition, so I figured I'd just leave it there, mount it to /media/whatever , and just have an empty home folder on the ext4 partition, that only contains things that Ubuntu and other programs put there by default.

So, I deleted the /home mounting line in my fstab and rebooted. Now I get "can't start session" error when I try to log in. I went in to /home in the file system, the empty one on the ext partition. Into that folder I copied my user folder and all of the hidden files in it.

My current fstab looks like this:

proc            /proc           proc    nodev,noexec,nosuid 0       0
UUID=7a2fdc51-be6e-4b9f-bf47-eaa0a7bade6d /               ext4    errors=remount-ro,noatime,nodiratime,discard 0       1
UUID=d945e120-aae9-489d-9740-2e91654e0ec3 none            swap    sw              0       0
UUID=962A-AB5A  /boot/efi   vfat    defaults    0   1
UUID=96069BFA069BD997 /media/shared    ntfs                   defaults,umask=077,uid=1000,gid=100       0       2 
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

(Basically what I did to break my computer was change /home to /media/shared). And a folder on the ext4 /home/[username]/ with all of the hidden files I had before.

Here is the result of ls -al on that directory:

drwxr-xr-x  9 root root 28672 Feb 15 00:04 .
drwxr-xr-x  3 root root  4096 Feb 14 23:56 ..
-rw-------  1 root root 33152 Feb 14 23:58 .bash_history
-rw-------  1 root root   220 Feb 14 23:58 .bash_logout
-rw-------  1 root root  3599 Feb 14 23:58 .bashrc
-rw-------  1 root root  3486 Feb 14 23:58 .bashrc~
drwx------ 51 root root  4096 Feb 15 00:01 .config
drwx------  3 root root  4096 Feb 15 00:01 .dbus
-rw-------  1 root root    27 Feb 14 23:58 .dmrc
-rw-------  1 root root 21954 Feb 14 23:58 .face
drwx------  4 root root  4096 Feb 15 00:01 .gconf
-rw-------  1 root root     0 Feb 14 23:58 .gksu.lock
-rw-------  1 root root   142 Feb 14 23:58 .gtk-bookmarks
-rw-------  1 root root 28628 Feb 14 23:58 .ICEauthority
-rw-------  1 root root    42 Feb 14 23:58 .lesshst
drwx------  4 root root  4096 Feb 15 00:03 .local
drwx------  3 root root  4096 Feb 15 00:03 .mission-control
drwx------  3 root root  4096 Feb 15 00:04 .pki
-rw-------  1 root root   675 Feb 14 23:58 .profile
-rw-------  1 root root   256 Feb 14 23:58 .pulse-cookie
drwx------  2 root root  4096 Feb 15 00:04 .screenlayout
-rw-------  1 root root  5676 Feb 14 23:58 .viminfo
-rw-------  1 root root    51 Feb 14 23:58 .Xauthority
-rw-------  1 root root   588 Feb 14 23:58 .xmaximarc
-rw-------  1 root root  7570 Feb 14 23:58 .xscreensaver
-rw-------  1 root root   417 Feb 14 23:58 .xsession-errors
-rw-------  1 root root   462 Feb 14 23:58 .xsession-errors.old

Plus a bunch of files I don't think matter called .fuse_hiddenXXXXX and .goutputsreamXXX.

  • First, nothing is listed in fstab as mounted at home. Second you should not use ntfs for /home – Panther Feb 15 '15 at 1:00
  • What are the ownership and permissions of the copied /home/username directory? Please edit your question to add the result of ls -ld /home/username/{,.Xauthority} – steeldriver Feb 15 '15 at 1:25
  • Thanks, I added the edit. I know I should not use ntfs, now -- that's the mistake I'm attempting to fix. Also I read in another thread that I can't find now that you don't need a /home line in the fstab if it's in the default place, but I could have misunderstood it. In any case, I did try a line UUID=7a2fdc51-be6e-4b9f-bf47-eaa0a7bade6d /home ext4 errors=remount-ro,noatime,nodiratime,discard 0 1 which didn't seem to help. Should I have that line in there? – user282097 Feb 15 '15 at 3:13
  • I am not sure if your umask should be 077 either, – No Time Feb 15 '15 at 3:37
1

The process I used, which may have been dopey but worked, was restoring my old fstab, logging in as usual and creating a home_backup with the necessary files and permissions.

I then got rid of the /home line in fstab, booted from the Ubuntu flash disk, and cp -rp the home_backup to home.

0

You need to fix the ownership of the copied /home/username directory, so that the files in it are owned by (and hence writable by) the account owner i.e.

sudo chown username:username /home/username

where username is replaced by the actual username of your account.

  • Hi, thanks -- my only access right now is via an ubuntu usb disk, and when I'm booted up with that, my username doesn't exist - I do that and I get chown: invalid user: [username]. Do I need to create a user? If I do that, is that different than creating a user on the actual install? For what it's worth I also can't log in as guest, I get the same error. – user282097 Feb 15 '15 at 16:37

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.