Stuck with Ubuntu login loop

I am unable to login to my Ubuntu 22.04 LTS desktop as I am stuck with the “Ubuntu Login Loop” problem. I am unable to resolve the issue with the standard internet recommended procedures of reviewing/changing the permissions of Xauthority and /tmp folder on the tty3 terminal (not as yet tried the final option of reinstalling the desktop environment), because surprisingly, even the tty3 terminal is looping and not permitting me to run the above cited troubleshooting solutions/commands. I am looking for an alternate solution, if possible, through recovery mode login, with the available external timeshift system backup; or, any solution implementable at the root?

Reinstalling the desktop environment often fixes this issue. And it’s quite easy.

Please try that and let us know if it worked.

The background to my landing with the cited problem - I modified the existing /etc/fstab of my working computer to include the UUID of a portable, external SSD drive loaded with a Ubuntu filesystem for plug-and-play use with any other computer. My interim troubleshooting diagnosis led me to believe the modifications made to be the likely cause of the computer to go into the ‘emergency’ mode. On removing the additional entries made, the normal booting of the computer got restored.
My endeavor to make an external, plug-and-play portable drive however remained unaccomplished, even with the literature support available on the Net. Can you help with a tutorial please, if possible?

Thanks Abhishek for your prompt response. There is no need to try out the re-installation option now.

1 Like

It should work if you connect the external SSD.
However, if you have something in fstab to mount, but it doesn’t exist, or it’s unmountable for any reason, your system will fail to start.

I think, if you set mount option errors=continue, the system will ignore if it can’t mount, but did not test this option.

Plug in your drive, click on it on the devices pane, and it will be mounted…
What’s the problem with that?

With the insertions made earlier in /etc/fstab to mount the portable drive (now removed), the external device was not getting detected in the devices pane, and the login loop was getting activated preventing access to the main filesystem…

If you mount a storage via fstab it will not be on the device pane.
However, if you just plug in the drive (which is not mentioned in the fstab), it should appear on the device pane.

If it doesn’t, I’d start to debug the problem with having a look at dmesg right after plugging it, or starting dmesg -w and plug the drive in while whatching the dmesg output.

An example, how this looks with a normally working USB drive:

65535.617714] usb 1-3: new high-speed USB device number 8 using xhci_hcd
[65535.766347] usb 1-3: New USB device found, idVendor=0781, idProduct=5571, bcdDevice= 1.00
[65535.766354] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[65535.766359] usb 1-3: Product: Cruzer Fit
[65535.766362] usb 1-3: Manufacturer: SanDisk'
[65535.766365] usb 1-3: SerialNumber: 4C530000210625103263
[65535.768207] usb-storage 1-3:1.0: USB Mass Storage device detected
[65535.768570] scsi host1: usb-storage 1-3:1.0
[65536.782932] scsi 1:0:0:0: Direct-Access     SanDisk' Cruzer Fit       1.00 PQ: 0 ANSI: 6
[65536.783604] sd 1:0:0:0: Attached scsi generic sg1 type 0
[65536.784474] sd 1:0:0:0: [sdb] 30031872 512-byte logical blocks: (15.4 GB/14.3 GiB)
[65536.785964] sd 1:0:0:0: [sdb] Write Protect is off
[65536.785973] sd 1:0:0:0: [sdb] Mode Sense: 43 00 00 00
[65536.786291] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[65536.870917]  sdb: sdb1
[65536.900977] sd 1:0:0:0: [sdb] Attached SCSI removable disk
2 Likes

Perhaps you have gone past this stage but a tool that may help

https://sourceforge.net/p/boot-repair/home/Home/

The other option I have needed before

https://wiki.ubuntu.com/RecoveryMode

I then run a fsck with named disks and repair.

But you may have got passed this point now with the help offered

Thank you, Paul; the suggested options have already been tried out but to no avail.

QUOTE: "Reinstalling the desktop environment often fixes this issue. And it’s quite easy.

Please try that and let us know if it worked"
UNQUOTE:
Tried out, as advised by @Abhishek, but ended up with errors - wasn’t a neat reinstall. Right now engaged in figuring out how to restore the original DE.

In attempting to resolve the Login loop problem, which got resolved eventually by implementing the suggestion of @Abhishek of reinstalling the Desktop Environment, it led to the following new issues cropping up, some of which have been resolved, and the others needing support:

  1. Basic Ubuntu 22.04.2 LTS system got installed with an altered/new UUID on the principal partition sda1. In the process, I lost all the system configurations steadily built by me over time with the old UUID of sda1.

  2. The silver lining however was that I had a timeshift rsync backup snapshot of the old system configurations. I used it for restoration to the old system state. The restoration FAILED due to failed dependencies, repeated booting into emergency mode and a host of new errors.

  3. With the troubleshooting experience gained in the recent past on the Ubuntu desktop, I could resolve all the post-re-installation errors and restore normal functioning.

However, I need support for fail-safe restoration and redeployment of my old system configurations still available with me as a timeshift rsync snapshot.

Opinion Only.
I do not believe a Timeshift snap shot is valid or can be used for an OS that is was was not taken from.
But like I said, it is just my opinion. I may be dead wrong.

2 Likes

I think @easyt50 is right. Timeshift is an all or nothing thing… I dont think you can restore part of an OS with timeshift. You can probably get at individual files because it uses rsync, but if you bring back part of an old OS like that there are bound to be problems.

When you install a new release, you just have to do all the configuring over again. I does not take all that much effort to setup networking and printers and so on.

For what you want, picking out individual files, you need a conventional backup facility… make a tarfile or use something like borg backup.
I am not a fan of timeshift, I think clonezilla is more reliable for full backups

Regards
Neville

1 Like