I lost my password and booted into the command line from the Grub menu. Now my PC does not want to boot into Ubuntu. Every time I reboot, I end up at the Grub command line. Is there any way to restore the Grub menu? I can boot into Ubuntu using Grub command line commands.


Since you lost your password, it sounds like you just need to change your password to get a normal boot. To do this hold down your shift key during boot up. Select recovery mode (which is usually the second entry). Wait for boot up process to complete. There will be a list of options. The one that you want is the Drop to root shell option so press the down arrow to get to that option and press enter to select it.

The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it) so be careful with what commands that you enter in the root terminal. If the file system is mounted as read only, you will need to enter: mount -o rw, remount/ in the terminal Now to reset the password, type: passwd username where username is the user name you want to reset. Substitute your username. You will then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Hit enter when you are done. You will be prompted to retype the password. Do so and hit enter again. Now the password should be reset. Type: exit to leave the terminal.

  • I cannot get to the recovery mode screen, my PC boots straight into the Grub command line. Pressing left shift, right shift or ESC do not work. – Hendré Jun 17 at 11:17
  • 1
    What does the GRUB prompt look like? There is a GRUB rescue tutorial at linoxide.com/grub-rescue-commands. It may be of assistance. – Rex Jun 17 at 14:58

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.