Reboot, now I'm stuck at grub prompt.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
tommyruff
Level 1
Level 1
Posts: 4
Joined: Wed Mar 17, 2021 6:16 am

Reboot, now I'm stuck at grub prompt.

Post by tommyruff »

Hi, I'm am pretty illiterate when it comes to Linux. I don't have dual boot or windows installed. After an update I have rebooted the system and now it has rebooted to a grub command prompt.. I have searched Google and tried to work my way through but I am lost. I have tried resetting boot order to default through bios hoping that may help but it makes no difference. I have taken a screenshot of where I am presently in regards to grub . I'm hoping someone can suggest what I should try next. I don't know how to add screenshot here so I will type what I have on my screen at present.
grub> ls
(proc) (hd0) (hd0,gpt2) (hd0,gpt1) (cd0)
grub> LS (hd0,1)/
efi/ EFI-old/
grub>_

Edit
Ok, so It shows the boot files are on hd0,gpt2

It appears I need to know the kernel version but I can't seem to get it from this grub prompt. I need to know it to load it before booting🤔

I need to set root
Grub> set root=(hd0,gpt2) {is that right?}

I need help
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
acerimusdux
Level 5
Level 5
Posts: 633
Joined: Sat Dec 26, 2009 3:36 pm

Re: Reboot, now I'm stuck at grub prompt.

Post by acerimusdux »

This should do it (be sure you have the proper /dev/ though, it maybe could be /dev/hda2):

Code: Select all

grub rescue> set prefix=(hd0,2)/boot/grub
grub rescue> set root=(hd0,2)
grub rescue> insmod normal
grub rescue> normal
grub rescue> insmod linux
grub rescue> linux /boot/vmlinuz root=/dev/sda2
grub rescue> initrd /boot/initrd.img
grub rescue> boot
If it boots successfully, you should be able to reinstall grub from there with:

Code: Select all

sudo update-grub
sudo grub-install
tommyruff
Level 1
Level 1
Posts: 4
Joined: Wed Mar 17, 2021 6:16 am

Re: Reboot, now I'm stuck at grub prompt.

Post by tommyruff »

Hi,
Thanks for the reply

I don't know how to get into grub rescue>

It boots to a grub>
tommyruff
Level 1
Level 1
Posts: 4
Joined: Wed Mar 17, 2021 6:16 am

Re: Reboot, now I'm stuck at grub prompt.

Post by tommyruff »

Hi,
Thanks for the reply

I don't know how to get into grub rescue>

It boots to a grub>

Edit
I ran those commands from grub>
And it has booted into mint 20 .
I'll update grub and see if it reboots into Mint again
acerimusdux
Level 5
Level 5
Posts: 633
Joined: Sat Dec 26, 2009 3:36 pm

Re: Reboot, now I'm stuck at grub prompt.

Post by acerimusdux »

Good! It's actually not much different from grub> vs grub_rescue>, you don't need the insmod commands from the regular grub prompt. So could have done:

Code: Select all

grub> set prefix=(hd0,2)/boot/grub
grub> set root=(hd0,2)
grub> linux /boot/vmlinuz root=/dev/sda2
grub> initrd /boot/initrd.img
grub> boot
But the extra commands shouldn't hurt, either.
tommyruff
Level 1
Level 1
Posts: 4
Joined: Wed Mar 17, 2021 6:16 am

Re: Reboot, now I'm stuck at grub prompt.

Post by tommyruff »

Thank you acerimusdux
you are a life saver
I have tried restart 2 times and it has rebooted into mint correctly.
I think my laptop is showing its age as it does reboot slower than I like.
maybe time for an upgrade.

Once again thank you very much :D
Locked

Return to “Installation & Boot”