-   Linux - Newbie (
-   -   update / reinstall grub (

el barto 06-15-2011 04:06 PM

update / reinstall grub
I am running Ubuntu 10.04 LTS and installed it on a partition and grub was installed also in that same partition sdb6.

now I deleted a partition, and resized the partition of Ubuntu so it had more space

it became sdb5

after restarting I got grub rescue

I can boot as follows (after a lot of reading on grub)

set prefix=(hd0,5)/boot/grub (this part is weird as sdb should hd1 .. I think)

insmod normal


I tried to update grub but whatever I do, after rebooting I always end up in grub rescue

I quess I am missing a part

does anyone know the solution to this problem? I am stuck with this

thanks a lot

andrewthomas 06-15-2011 04:16 PM

Here is a link to purge and reinstall grub2:

sandwormusmc 06-15-2011 04:18 PM

Why not just edit grub.conf and change hd(0,6) to hd(0,5)?

Or, better yet, check to see if you can boot using a UUID for the drive. That way if you move around partitions again it will just boot using a partition-independent unique identifier ...

Larry Webb 06-15-2011 06:26 PM

If you can boot into ubuntu and from terminal

sudo update-grub

That should change the grub.cfg file for you.

Here is good tutorial on grub2

andrewthomas 06-15-2011 06:37 PM

If update-grub does not correct the problem, then open up Synaptic and select the grub-pc package and use the menu to choose to reconfigure.

This should correct the root and re-install to the MBR.

el barto 06-16-2011 12:29 AM

I did the synaptic stuff, the sudo update grub before posting here, and the grub.cfg file seems to be running with the correct info. I know it gets its information from another file but I can not find this file as grub.cfg should not be edited.

I will try the other link, boot from live cd and go into terminal and see where I will get

thanks anyway

Larry Webb 06-16-2011 06:07 AM

The tutorial I listed gives you the how-to for editing the grub.cfg
List your changes in the /etc/grub.d with a text editor then run update-grub.

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