1

Hey :) I think it's the most strange problem here. actually I believe that I can never get an effect without a cause but what happened to me makes me think other way.

I'm so lost, my lap is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and the login screen comes back after 5 seconds.

I'll describe the problem: I've just installed Dr.web antivirus and everything was good then 10 hours later while updating everything becomes frozen. so I manually restart the system then got that.

I have all my staff there, it's kind of nightmare, I did verything I know, all trics... I've even upgraded to ununtu 18.04 cause I can access tty. I was running ubuntu 16.04 Dual boot with Windows 10.

Maybe it's because there's no disk space available in $HOME directory, so when I run df -hi , I got something like this :

Filesystem    Inodes  Used  Ifree Iuse%   Mounted on
udev            586k   846   585k   1%    /dev
tmpfs           592k   836   591k   1%    /run
/dev/sda3        90M  343K    90M   1%    /
/dev/loop0       15K   15K     0   100%   /snap/core/4206
/dev/loop1       15K   15K     0   100%   /snap/core/4110
/dev/sda5                                                     

As I can see /dev/loop0 & /dev/loop1 are both fully used but I don't understand what does it mean ... I can't blame the disk space cause I have 1000 GB HDD, 700 GB for ubuntu & 300 GB for windows, I don't know :(

please can anyone help ? you can't imagine how that can save my life.....

  • 2
    First I would switch to a terminal (ctrl+alt+f4 or whatever you prefer) and check you can login there (checks username & password for change). Next I'd suggest you df -hi to ensure you have some disk space available in your $HOME directory (the GUI needs working space for temporary files; if it can't find any the login fails & you are logged back out; the text login doesn't need it). There are other causes, but this checks what I check first... – guiverc Jul 21 '18 at 8:06
  • Thank you for the answer, yeah I can switch to terminal with my username and password on tty 4 for example. so when I typed " df -hi " I got something like that /dev/loop0 15k 15k 0 100% /snap/core/4110 so both dev/loop0/ & dev/loop1 are completly used I don't know what to do size is 15k and 15k used – Kaylee Jul 21 '18 at 10:01
  • 1
    There is very limited editing & formatting options in comments; you are best editing your question, and adding extra info there (it's also easier for others who look at your question to see it & possibly chime in). Even if you can't format it yourself; others can assist you (but we can't edit your comments). The key is your $HOME (/home/ or /home/user/ partition & directory). – guiverc Jul 21 '18 at 10:15
  • Thank u I'll edit the question for more details ... note that I still can access Guest session – Kaylee Jul 21 '18 at 11:34
  • @guiverc , I've edited my question, describing what I got when I issued The command u suggested , I didn't understand what does it means. should I maybe get ride of windows then extend ubuntu partition to the whole drive ? i'll do it if it could solve the problem . maybe it's because of disk space ... can u explain the output I've got ? – Kaylee Jul 27 '18 at 19:08
1

One possible cause of a login loop is a bad ~/.bashrc file ... so lets reboot into recovery mode and fix this

reboot machine then immediately upon start of boot begin to repeatedly tap shift key until the purple grub menu appears

use down arrow key to move cursor to Advanced options for Ubuntu then hit enter

choose one saying recovery mode hit enter

now at screen called Recovery Menu use arrow keys to move down to option root Drop to root shell prompt then hit enter

at the terminal issue

mount -o rw,remount / 

to enable write mode

at last now we will actually do the fix which is to safely remove the potentially bad .bashrc ... IMPORTANT what your normal username ? ... lets just show all defined usernames on your machine by issuing

ls -la /home/

one of those listed must be your login username you setup ... yes ? ... say its somename <-- replace with your username as shown in above output

ls -la /home/somename

this should list tons of files ... ignore them we just issued this to confirm we are using correct username ... now we list your .bashrc file by issuing

ls -la /home/somename/.bashrc    

in above command there is a period at beginning of .bashrc

again this should display that file ... now issue following to move the .bashrc so its ignored and the username will simply pickup the default settings

mv /home/somename/.bashrc   /home/somename/.bashrc_ignore

that should just silently return ... yes ?

DONE ... now reboot

after reboot you should be able to login OK ... if this does fix your login loop issue that .bashrc file has some bad syntax so be careful while you piece it apart and put it back together so you regain a sane ~/.bashrc

  • Comments are not for extended discussion; this conversation has been moved to chat. – terdon Jul 23 '18 at 12:07

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.