0

My grub is broken and my PC is booting into the grub command line. I managed to get the PC to reboot with the following commands:

set prefix=(hd0,2)
set root=(hd0)
insmod linux
insmod normal
normal

My PC reboots normally after I issue the command, however when I reboot my PC returns to the grub command line.

Where is my issue. I cannot fix grub from the bash command line because I lost my password. How do I fix grub and recover my lost password from this point?

Bash prompt

2
  • 1
    Without seeing the grub errors that dropped you to the prompt we can't help you. Are you able to take a picture of the screen with your phone or a camera when you are at the GRUB prompt so we can see the items before it that triggered that drop to the prompt?
    – Thomas Ward
    Jun 10, 2021 at 14:19
  • Hi @ThomasWard. I updated the post with the prompt image. No errors are given.
    – Hendré
    Jun 10, 2021 at 14:35

1 Answer 1

1

I would put this as a comment but don't have the reputation to do so, so I'll leave an answer instead. If you are able to edit GRUB entries, you could always try entering into single-user mode upon booting up. This will put you inside of a root shell where you can run passwd <your user name> and change your password to something new without needing to remember your old one.

5
  • I have managed to boot into single-user-mode and succesfully reset my password. However dispite running sudo update-grub, my grub menu remains broken. Every time I reboot I end up at the grub prompt. How do I restore my grub menu?
    – Hendré
    Jun 10, 2021 at 18:10
  • What did you do right before this started happening? Did you update fstab, add a drive, change something in /etc/grub.d/? Don't hold back information if you want help. Jun 10, 2021 at 20:23
  • @OrganicMarble I lost my password and tried to reset it using the bash shell from the grub menu. I must have made changed to grub that now makes it boot to the grub shell every time. Exactly what changes I made I can unfortunately not recall.
    – Hendré
    Jun 11, 2021 at 10:54
  • I a computer repeatedly boots into the grub prompt, there must be a procedure to restore grub to it's original state.
    – Hendré
    Jun 11, 2021 at 11:15
  • This is another tool that I have used when my GRUB appears to be broken. Even though it looks old, I have seen it work for older systems, maybe you could give it a try? Jun 11, 2021 at 23:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .