Page 1 of 1

[SOLVED] Grub2 goes into rescue prompt

PostPosted: Aug 20th, '16, 22:21
by aiiaiiio
Hello,

I have mageia6 sta1 installed. I don't know exactly what triggered my problem (an update maybe?).
Everything was fine for weeks, then one time I halted my computer and the next morning the grub menu didn't appear, instead I was dropped into a grub prompt.

What could have happened? I have Windows 10 installed as well in dual boot, so I could boot into that like this:
Code: Select all
chainloader (hd0,msdos1)+1
boot


I don't know how to boot linux manually, and I also don't know how could I solve this problem. Please help.
What additional info would you need to analyze the situation?

Best regards,
-- Tamás

Re: Grub2 goes into rescue prompt

PostPosted: Aug 21st, '16, 11:08
by gohlip
I assume you use bios-legacy and msdos partitioning.

Taking Mageia partition as sda5 (change below to correct partition)
Boot up a live cd, at terminal
Code: Select all
# mount /dev/sda5 /mnt
# grub2-install --boot-directory=/mnt/boot /dev/sda


Reboot.

Re: Grub2 goes into rescue prompt

PostPosted: Aug 21st, '16, 11:37
by aiiaiiio
Hello gohlip,

I assume you use bios-legacy and msdos partitioning.
correct :)

I already found this procedure on other forums, but didn't help me. I tried it again anyway, and this time it worked! :D I don't know how, you probably put a bit of mageia into your post, so thank you very much!

This is what I did exactly:
The Mageia6 sta1 livedvd wasn't able to boot for some reason so I used Mageia5 for this.
My linux partition is sda3

grub2-install is not installed on the live system by default, I had to install it first:
Code: Select all
[live@localhost live]# su
[root@localhost live]# urpmi grub2


Code: Select all
[root@localhost live]# mount /dev/sda3 /mnt
[root@localhost live]# grub2-install --boot-directory=/mnt/boot /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
[root@localhost live]# reboot


Thanks again!
--

Re: [SOLVED] Grub2 goes into rescue prompt

PostPosted: Aug 21st, '16, 13:18
by gohlip
Good to hear. Welcome. Cheers.