-   Linux - Software (
-   -   Recurring Grub rescue mode after update-grub (

harris4got 12-07-2010 05:13 AM

Recurring Grub rescue mode after update-grub
Hello All,

I have an Ubuntu 10.4 installation (dualboot with windows XP) with grub2.

After I resized some of my partitions using a gparted live cd, the system goes directly to grub rescue mode every time I boot.

Then I follow the instructions which are given in grub2 wiki site to boot.

The grub boot directory is now located in sda6 (hd0,6) in my system as found out using 'ls' command.

But in the grub rescue mode when I enter the 'set' command (one of the very few commands available), to display current prefix and root, it gives "(hd0,7)/boot/grub" as 'prefix' and "hd0,7" as 'root'.

After entering the following commands, I'm able to boot


set prefix=(hd0,6)/boot/grub
set root=(hd0,6)
insmod linux
insmod normal
linux /vmlinuz root=/dev/sda6 ro
initrd /initrd.img

Boot is successful and I can log in to my system and GUI and all

Then I update grub using update-grub command. Then I check the grub.cfg file to make sure the entries are right.

And the /boot/grub/grub.cfg has hd0,6 in every entry like


...insmod ext2
set root='(hd0,6)'
search --no-floppy ..

hd0,7 doesn't appear anywhere.

Then again at the next boot, again there is only a grub rescue prompt and prefix & root has (hd0,7).

There are other users at my home not familiar with ubuntu. windows is their OS of choice. So I don't want to remove windows installation.

I'm grateful to anyone who can shed some light on this or may know whats wrong here.

EDDY1 12-07-2010 09:27 PM

Are you able to boot windows?
Since you can get in with your method, once in do:
sudo os-prober
that will find windows if you can't boot it.
then do
sudo update-grub

harris4got 12-07-2010 11:14 PM

Thank you for the reply
Thank you for the reply

I tried os-prober

root@jai-desktop:~# os-prober
/dev/sda1:Microsoft Windows XP Professional:Windows:chain

Then I updated grub

root@jai-desktop:~# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-26-generic
Found initrd image: /boot/initrd.img-2.6.32-26-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sda1

But still it boots to grub rescue mode

harris4got 12-07-2010 11:59 PM

Problem solved..

All that was required was reinstalling grub

I did 'install-grub'

and everythings fine now

I would again like to thank Eddy1 for replying.

EDDY1 12-08-2010 12:12 AM

Congrats and thank you, even though it was you who figured it out.

spin12armd 04-23-2012 02:27 AM

same grub rescue problem, help me to solve it
same grub rescue problem, help me to solve it

yancek 04-23-2012 09:30 AM


Start a new thread. This one is marked Solved and not many will be looking at it. Post some details, what operating system(s), new installation? working previously? partition and drive information?

All times are GMT -5. The time now is 03:10 PM.