I am using Ubuntu 20.04. I can now no longer login to my machine. Attempting to login will make the screen go black, and then I get thrown back to the purple login screen.

This is the timeline of the issue:

  1. I added a new alias to my .bashrc file.
  2. I did ‘source .bashrc’ in my terminal.
  3. Then I did a reboot and I can’t login.

I’ve tried using Ctrl+alt+f3, to login through the terminal but the same problem happens when I try login to the terminal.. It kicks me out again right away. Any help would be amazing!

I have tried booting into recovery mode, but I feel like it might be disabled. Holding down escape during boot gets me stuck at this screen.

I feel I might be a bit screwed. I can’t access recovery mode, or login as root. And the login loop is persistent when logging in to the terminal or the gui login. enter image description hereenter image description here


1 Answer 1


Boot from live media (e.g. an Ubuntu installation USB stick), mount your root filesystem and move your .bashrc away for the moment, then reboot into your normal system.

Personally I always set a root password so I am able to recover from exactly this situation. I don't usually work with the root account, but it's there in case I need it (usually when I did something really stupid).

Judging from the error message, you might have run into this problem:

Ubuntu 20.04 Failed to Set MokListRT: Invalid Parameter

  • I’ve ordered a sata to USB cable, so the plan is the take out the disk with the dodgy bashrc, boot into my usb, and then use the sata to USB to edit/patch my bashrc. I’m definitely going to set a root password after this, and potentially add a second user or something. Mar 7, 2021 at 21:19
  • 1
    No normal USB port where you could simply plug a USB stick in? No chance to write an ISO with a Ubuntu live system to a USB stick? Physically removing the disk seems like overkill to me.
    – HuHa
    Mar 7, 2021 at 21:38
  • So I have a liveUSB which I originally used to install ubuntu. But I can’t seem to get access to the grub boot menu to boot into my live USB, OR use the boot menu to boot into recovery mode. I’ve tried pressing shift and escape while booting, and neither seem to have the desired effect. Holding down escape will keep my trapped on the “Failed to make MokList” page forever. Mar 8, 2021 at 7:02
  • 1
    Check your BIOS if you changed from "secure boot" to "legacy boot" (or the other way round).
    – HuHa
    Mar 8, 2021 at 8:56
  • I solved it using my SATA cable and booting from my live USB. I had left this line in my .bashrc uncommented. source ~./.bashrc I feel like the MokList issue was potentially stopping me from getting into grub. Mar 9, 2021 at 21:06

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.