I have a new build which I have set up as dual boot with Windows10 alongside ubuntu 18.04. The Ubuntu installation has a root/home and swap partitions.

As part of the set up process I was trying to install GPU drivers but that seems to have seriously screwed things up.

Now when I try to log in the screen fades to black only to reemerge as the login screen I know there is a workaround using ctrl + Alt + F3 but for that you need to know your login (and I don't).

There is also a workaround to find your user name by going in through recovery mode but unfortunately my mouse and keyboard won't work in recovery mode.

It really is a catch 22!

The only thing left I can think of is to reinstall (unless someone here has a better idea) to:

  1. get rid of the dodgy drivers
  2. start over with a new login

When I boot from the installation DVD, there is an option to delete and reinstall 18.04 but this process only deletes the root drive. Would this be sufficient to get rid of the dodgy drivers/forgotten login or should I also delete the home and swap partitions manually?


Pass init=/bin/sh rw parameter after your kernel in grub, then you'll get an instant rootshell.

  • I went to boot Advanced Options For Ubuntu, then from the grub GUI I typed c to bring up the grub command line from there I types in your code above but it doesn't seem to have changed anything? Indeed what is this code meant to do (sorry but I'm a noob)? – Bazman Jul 31 '18 at 9:03
  • 1
    press e instead of c. – Ipor Sircer Jul 31 '18 at 9:14
  • Tnx, 'e' takes me to the edit the commands before booting screen. There is no prompt to enter the code above although F2 takes me to the command line, but it just seems to be the same command line as before and as before the code above doesn't appear to change anything? Can I just confirm what it is, that this command will do? – Bazman Jul 31 '18 at 9:25
  • 1
    After pressing e you will find kernel image starting with vmlinuz ... after this line write the above code suggested by ipor sircer – Prvt_Yadv Jul 31 '18 at 12:49

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.