Tuesday, 1 November 2016

Grub Rescue

I got this prompt when I was trying to clear out some Disk from my Win 7 for Ubuntu. Here are the commands I've used to fix the problem.

(1) Find the /boot partition
ls

we can see something like:
(hd0,1),(hd0,5),(hd0,3),(hd0,2)

(2) Try them one by one and if one shows a file "grub.cfg", that is our /boot
ls (hd0,X)/grub -- I remember I have an independent partition for /boot

(3)
grub rescue>set root=(hd0,5)
grub rescue>set prefix=(hd0,5)/grub
grub rescue>insmod normal
grub rescue>normal

We can see our grub list now. BUT!!!!!! It's not over yet.

(4) last step

sudo update-grub
sudo grub-install /dev/sda



ref:
http://forum.ubuntu.org.cn/viewtopic.php?t=348503
http://askubuntu.com/questions/192621/grub-rescue-prompt-repair-grub

No comments:

Post a Comment