0

I have an old desktop PC (64bit) and an old laptop (32bit), on each I have 2 Windows and at least 2 Linux distros .

At the moment I have Ubuntu 14.04.5 LTS Ubuntu 16.04.2 LTS installed.

After repartitioning the HDD and (or) Windows maintenance, I could only boot to windows.

So I've used a boot-repair stick to get the grub menu back.

The home and swap UUID became different from those listed in the fstab for one Ubuntu.

I can login to Ubuntu 14.04 but not to Ubuntu 16.04.

From Ubuntu 14.04 I created new partitions for home and swap for Ubuntu 16.04 and edited the fstab to contain the new UUID. But it didn't work, I can't login to Ubuntu 16.04.

It tries to login then comes back asking again for a password.

I have no Ubuntu 16.04 live CD. Please help me fixing that?

Abo sal

Ziazis
  • 2,174
abo sal
  • 21
  • 1
    fstab is for booting not login, are you having trouble booting or does it boot and you can't log in? – ravery Jun 29 '17 at 09:55
  • Have you tried a login in a tty or have you just tried the login from you xsession? – Ziazis Jun 29 '17 at 10:31
  • 1
    Can you log in on a virtual console (Ctrl+Alt+F1)? – David Foerster Jun 29 '17 at 10:40
  • 1
    Could that be a duplicate of https://askubuntu.com/questions/223501/ubuntu-gets-stuck-in-a-login-loop ? – variona Jun 29 '17 at 12:00
  • It boots till it reaches user name and password, I enter name and password it try log in but it comes back to user name and password, I use alt ctrl F1 to go to terminal and log in using name and password the type reboot. I used this command to edit fstab from the other ubuntu sudo -i

    mkdir /sparrow mount -t ext4 /dev/sda2 /sparrow

    gedit /sparrow/etc/fstab save it umount /sparrow

    – abo sal Jun 29 '17 at 12:19
  • yes I can log in on a virtual console (Ctrl+Alt+F1) – abo sal Jun 29 '17 at 12:25
  • Please enter ls -lA and tell me the output for the file .Xauthority – variona Jun 29 '17 at 12:26
  • To me it sounds like your user doesn't have either a home or the rights to the home are not fitting to the user anymore. Since you said you recreated the home partition that would be my guess. – Ziazis Jun 29 '17 at 13:10
  • @ziazis as the OP can login from the virtual console, he seems to have a home. The symptom described looks to like the (already often asked) login loop problem. https://askubuntu.com/search?q=login+loop – variona Jun 29 '17 at 13:42
  • You can login into a virtual console even without a home, it will tell you /home/blabla not found opening instead, and still open a session. But his issue occurs exactly if the home is not reachable for the xsession. – Ziazis Jun 29 '17 at 13:45
  • @ziazis I guess you are right with "the rights ... are not fitting". Maybe using different userIDs for 14.04 and 16.04 Abo sal: "From Ubuntu 14.04 I created new partitions for home and swap for Ubuntu 16.04" – variona Jun 29 '17 at 13:48
  • my problem is that after partition modification of the HDD in windows the real UUID Using 'blkid' doesn't much the home UUID listed in the fstab. So I used the other ubuntu to creat the desired home and fstab using the method recomned by , Steve Stites in:

    http://www.linuxquestions.org/questions/linux-hardware-18/mounting-question-631370/

    – abo sal Jun 29 '17 at 13:55
  • variona when typing ls – lA I get about 20 lines that starts with drwxrwxrwt or something tlike that I have 2 HDD ls -ld /tmp

    drwxrwxrwt 10 root root 4096 jun 29 16:36 instead of drwxrwxrwt 15 root root 4096 Nov 30 04:17 /tmp

    – abo sal Jun 29 '17 at 13:57
  • @abosal the important thing here is if you have logged in from the virtual console into your account and you enter ls -lA do you see your directories and files AND do they belong to the user you logged in with: For example if I log in as variona a typical line would look like this: -rw------- 1 variona variona 1209 Jun 29 09:16 .Xauthority , meaning I have the right to read and write (rw) this file. – variona Jun 29 '17 at 14:19
  • @variona After copying the important data I intentionally deleted the old home and swap partitions (Ubuntu 16.04 ) to recover unused space at the end of the HDD, what is left is the /root partition. After boot-repair I used Ubuntu 14.04 to create new partitions for home and swap for Ubuntu 16.04, and modified the fsatb of Ubuntu 16.04, I used the comments of Steve Stites http://www.linuxquestions.org/questions/linux-hardware-18/mounting-question-631370/ I can log into gust account. when tryping sudo mv ~/.Xauthority ~/.Xauthority.backup I get:file or directory not found – abo sal Jun 29 '17 at 15:29
  • /home was on /dev/sda7 during installation

    #UUID=bf7235e3-c5d9-4961-9f93-b3caedf1cdb3 /home ext4 defaults 0 2 UUID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /home ext4 defaults 0 2 after delteing /home partition UUID=bf7235e3-c5d9-4961-9f93-b3caedf1cdb3 does not exit using geparted I created new /home UUID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

    – abo sal Jun 29 '17 at 15:46

0 Answers0