# [SOLVED] Grub Rescue



## loftus49 (Aug 26, 2010)

Have Ubuntu 10.04 on one hard drive and Win XP on another hard drive. Got 35 viruses a couple days ago and it fried the Win XP hard drive. Had to reformat it. 

Now, cant boot (via Grub or bios) to the Ubuntu drive. The data is still there but just can't boot to it. If I try a boot to the hard drive via the bios or partition commander recovery disk, I get a prompt, "Grub rescue >" 

Any ideas?


----------



## archeleus (Aug 26, 2010)

*Re: Grub Rescue*

When you are in GRUB rescue, type in the following

_set
prefix=(hdx,y)/boot/grub_

If (hdx,y) is a boot partition, you have to omit the /boot part from the path, ie type "set prefix=(hdx,y)/grub

Now if you want to jump out of rescue into a normal console,

_insmod (hdx,y)/boot/grub/linux.mod_

Now for booting.

_set root=(hd0,5)
linux <vmlinuz> root=<root device>
initrd <image>
boot_


----------



## loftus49 (Aug 26, 2010)

*Re: Grub Rescue*



archeleus said:


> When you are in GRUB rescue, type in the following
> 
> _set
> prefix=(hdx,y)/boot/grub_
> ...


Many thanks but now it seems to not even load Grub Rescue. The hd is hd1,0 (I think) but I can't seem to get to it other than in Partition Commander recovery disk. 

Is there any way to correct this other than starting over with a reformat and reload, update, update, update, update, etc? All the data seems to be there. Can I install a boot option from my Win XP system? Is there something I can do in the Partition Commander Recovery Disk?

"Frustration is only momentary insanity" - Hopefully.


----------



## loftus49 (Aug 26, 2010)

*Re: Grub Rescue*

Found solution! zmanda 
http://www.ubuntu-inside.me/2009/06/howto-recover-grub2-after-windows.html 

It worked!


----------



## wmorri (May 29, 2008)

Glad you were able to fix this problem, and thanks for posting the fix for others too!


----------

