Restoring GRUB from YaST

To fix a Windows problem with hibernation, I had to let it overwrite my MBR. I can still boot into openSUSE 11.3 thanks to a wonderful piece of freeware called Plop Boot Manager, but the GRUB menu is no longer in my MBR (obviously).

How can I force a rewrite of GRUB to the MBR from YaST?

Do you mean that you went to YaST > System > Bootloader and then to the tab Bootloader installation and that you hesitate what to fill in there? Then better tell what you planned to do and if you guessed right.

Yes, I’m not sure which options should be checked. This is my current config:


I already tried checking “Boot from Master Boot Record”, but the Windows MBR was still in place.

Edit: oh wait…

Boot from Master Boot Record is not recommended if you have another operating system installed on your computer.

I should probably disable that then, shouldn’t I?

Does this “current config” reflect the situation as it was before you damaged the MBR or is it a result from your trials to restore?

I should first set it to what it was before the Windows actions. And there is an Other button lower right which has promising netries.

In any case, there are a lot of threads here about the same subject. A little bit of searching on the forums might unveil at least a dozen.

This is easy
Re-Install Grub Quickly with Parted Magic

Then rather boot from the bathroom! lol!

Who says that? And which operating system if I may ask?
I seriously start to believe that Microsoft put its noze in YaST!

It’s in the openSUSE documentation - just click the “Help” button on the “Boot Loader Installation” tab to reveal it.

I still have access to my openSUSE install through a Plop Bootloader CD-ROM, so I don’t see why I should burn Parted Magic to a CD-ROM to do this.

I don’t remember exactly. That’s why I came here for advice.

I still have access to my openSUSE install through a Plop Bootloader CD-ROM, so I don’t see why I should burn Parted Magic to a CD-ROM to do this.

Suit yourself
Just offering advice -for what it’s worth.

So there’s no way to rewrite the bootloader to MBR from openSUSE that you know of? I know that Ubuntu has a command called grub-install that does the trick.

I’ve read that I can use the install DVD to repair the bootloader. Before moving on to Parted Magic, I think I’ll give that a try.

I use PM because it’s quick and never fails. But you need to download the version I host.
It just picks up your original settings, which are still there in /boot/grub/menu.lst

But I would need to see your fdisk info to advise otherwise:

fdisk -l

Except when he changed that withou first writing diwn what they were.

True
But I assume the OP has not fiddled with this - hope…!
Darn, this is so easy it isn’t even funny.

Open a terminal as root and type:

**grub**
grub> find /boot/grub/stage2
  (hdx,y)
grub> root (hdx,y)
grub> setup (hd0)
grub> quit

where (hdx,y) is the hard disk and partition (starting at 0) where openSUSE’s Grub stage2 is installed (i.e the directory /boot/grub)

  • It is totally different from Ubuntu, which uses another Grub version (Grub2).

Awesome, please_try_again! Your short and snappy solution worked. Sounds like wiki material. :slight_smile:

In fact the answer can be found here openSUSE SuSE Linux HOWTOs and Tutorials by Swerdna. Somewhere lower right, with a bit of reading.
And Swerdna has a lot of other usefull things there.

In fact, the answer can be found in any Grub manual or tutorial… and in hundreds of posts in this and other forums. This is nothing but Grub basics.

As I allready told the OP in post #4 above:

In any case, there are a lot of threads here about the same subject. A little bit of searching on the forums might unveil at least a dozen.

But I love Swerdna’s site and the OP asked for a wiki or the like.

It’s not as obvious as you’d think. I’ve been toying with Linux for at least eight years. When I first tried Linux, I still had to unmount the CD-ROM manually before I could eject it and LILO was the default boot loader. So for the 19 years I’ve been on this planet, I think it’s safe to say that I’ve learned quite a bit about Linux. I’m far away from being as all-knowing as you are, but I have put a lot of effort into getting to know Linux.

There’s a LOT of information out there, both good and bad advice. Some of it is distribution-specific or tied to a certain version of a product. I try my best to find a solution using old-fashioned googling, but it didn’t occur to me that I should go look for it in the GRUB manual. I thought that openSUSE had its own way of repairing the MBR, so I thought of YaST and not the GRUB manual.

Anyway, I’m just saying that it isn’t easy to find a solution of a problem related to something you don’t know the ins and outs of. Let alone that people who are new to Linux can figure this out. (On a side note: I’ve added this solution to the wiki should anyone ever come across the same problem.)

Oh yes. It definitely has its own way. That’s the only one I know to arbitrarily write generic bootcode there and make Windows users happy … but other Linux distros’ users, who previously had another Grub in MBR , unhappy. But you could have done what you intended to do from YaST before you stepped on yet another brilliant advice (!):

Boot from Master Boot Record is not recommended if you have another operating system installed on your computer.

IMHO, there are several bugs in Yast - that people prefer to call features - and that are unlikely to be fixed any time soon, as long as openSUSE will assume that “another operating system installed” necessarily means Windows (even if it’s true in most situations). But this is a political (or economical) issue rather than technical. :frowning:

On 2011-01-08 21:36, pdedecker wrote:
> I thought that openSUSE had its own way of repairing the MBR, so
> I thought of YaST and not the GRUB manual.

Yes, it has. Or had: the easy way was the repair feature of the install cd/dvd, which was removed.
With YaST the trick was to modify something innocuous, like the timeout, to force a rewrite.

If you start changing what was already configured, then it is not possible for us to do a
recommendation.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Minas Tirith))