reinstall grub boot loader

I am running Windows 7 and openSuse 11.3 as a dual-boot system.

I had to run a Windows 7 Startup Repair, which apparently reset the Windows boot loader, so now I am not getting Grub.

How do I reinstall or reactivate the Grub boot loader? I am assuming I have to use the installation DVD?

Thanks

I had this problem before and I believe I resolved it by setting the boot partition to the Linux partition via fdisk. But now I can’t remember how I did it.

I am trying to use the Gparted CD but it craps out when I click Failsafe Settings.

How can I get to the command prompt from the Live CD?

I downloaded GParted 0.9.6 and I was able to set the boot flag on my Linux partition and remove the boot flag from the Windows system partition. Apparently the Windows Startup Repair set the Windows system partition as the boot partition.

Now all is well.

LOL yep that is what happens the MBR was replaced by the generic (not grub) MBR and the boot flag was set to the Windows partition.

I reinstalled the Grub loader like this.

Start the system from the openSUSE live CD.

Then:
su
grub
grub> find /boot/grub/menu.lst
This replies (hdx,y), for me it’s (hd0,3), so hd0 is the boot disk, Linux lives in partition 4 (counted as 3)
grub> setup (hdx) (hdx,y) – DO NOT TYPE (hdx,0), this will clobber the 1st partition on the drive, you only want to write the MBR.
OR
grub> exit

Reboot.

Do read the Grub manual. openSUSE uses Grub 0.97, so do get the right one.

Sorry, it should be without the “OR”:
grub> find /boot/grub/menu.lst
grub> setup (hdx) (hdx,y)
grub> exit

There just isn’t a way for ordinary mortals to do this… I wish they could bring back the “reinstall bootloader” in the installation system - it seems like a very common problem. Ah, well, time to just reinstall. That always works.

[quote="“PattiMichelle,post:8,topic:71016”]

There just isn’t a way for ordinary mortals to do this… I wish they could bring back the “reinstall bootloader” in the installation system - it seems like a very common problem. Ah, well, time to just reinstall. That always works.[/QUOTE]

On the contrary, this is just the way for ordinary mortals who don’t know how Grub works and don’t realize that only ordinary mortals are interested in seeing a boot menu. The bootloader only cares about stage2. Therefore the right command should be:

grub> find /boot/grub/stage2

If there is/was a “reinstall bootloader” function, it would probably be as bad as the Windows repair function and blindly overwrite the MBR with a generic boot code, no matter what’s in there (YaST still does that if you don’t pay attention - and nobody clicks 3 times to uncheck the default.)

BTW, did you notice that this thread is 1 year old?