How to restore Grub settings with a broken Grub


I just installed openSUSE 12.1 and wondered what’s the shortest possible delay for Grub to boot automatically (timeout). I find those delays rather annoying so I prefer a very short delay that doesn’t even show the bootloader but lets you react by frantically pressing any key at the crucial moment. First I was a bit surprised to see that you can configure 0 seconds - after all, that would mean you don’t have even time to react and to choose other options than the standard option. I was being curious anyway and couldn’t imagine that Grub let’s you configure something which in fact corrupts it.

So I wanted to ask how to restore the Grub settings. I thought I could choose a partition to boot from with the openSUSE installation disk. Unfortunately, this is not the case, there’s only a meagre “Boot from Hard Disk” option. Then I thought I could boot Kubuntu and change the Grub settings from there - only I couldn’t find the grub configuration file. /boot/grub/ only contains two files, no menu.lst or something like that. What is your advice here?


Welcome and I like the username. That might escape most folks.

Are you telling us you fiddled with grub and now it doesn’t work?
You mentioned you examined /boot/grub/
But didn’t find menu.lst
Can you see menu.lst.old (If you can, make a copy of it’s contents)
Report back

Thank you. Well, let’s not call it fiddling, let’s rather say I chose to boldly go where no man has gone before. I thought it should be a piece of cake to boot the partition from a bootable CD in case something goes wrong. With Kubuntu, I searched for menu.lst globally, but found only two files ending with menu.lst (some example files). I mean, Grub is still there, it just doesn’t let you do anything else than boot Windows.

Kubuntu uses Grub 2 that is a different animal from the legacy grub still used by OpenSUSE. It does not use menu.lst

So are we talking about Kubuntu or OpenSUSE here or both. You need to spell out what you are doing and what is installed etc

If you are booting a live CD you need to mount the partition that has the /boot on the drive. What you are seeing is the file system running the live OS not the file system on the hard drive.

As I mentioned above, I wanted to use Kubuntu (that is, a live CD) to gain access to the Grub configuration file.

Make absolutely sure you know which is your root partition (Unless you know you have created a separate /boot partition)

Look again.

Are you saying, you still get a grub menu, that lets you boot windows?

You can gain access to the configuration file (such as mounting the root partition, opening and editing /boot/grub/menu.lst) but nothing more! Do not try to repare/reinstall Legacy Grub (openSUSE) from a Grub2 based live CD (Ubuntu).

I don’t exactly know where Grub is installed, I’ve always thought it must be the MBR but I recall that it was unchecked during the installation. I didn’t intend to use some Kubuntu software to fix the openSUSE installation, but only to change the timeout value to 1 in the Grub configuration file. Only I don’t find it. I also know which partition my openSUSE is installed in, so in case there is a boot CD that lets you specify that partition and boot from it, I would try that as well.

You can mount your openSUSE root partition from any Linux live CD, open the file /boot/grub/menu.lst as root and change the value of** timeout** (which defaults to 8 s.) there. It doesn’t matter where the stage1 of Grub is installed. Stage2, including the boot menu, is always in the directory /boot/grub.

  • But why would you do that from a live CD?
    ** If you have problem booting Linux, reducing the bootmenu timeout might not be the best thing to do.

Grub and openSUSE are fine, it’s only the timeout that doesn’t let me choose openSUSE. menu.lst is just not in /boot/grub.

You’re probably looking in the /boot/grub of the live cd, not the one of your hard disk. If you mount your root partition in /mnt, that would be /mnt/boot/grub.
If openSUSE is fine, why are you using a live CD to change the timeout. What about booting openSUSE (despite this timeout that you don’t like) and modifying the timeout from the installed system? You’re making things more complicated by trying to edit the boot menu from a live CD.

If SUSEis fine
Boot it
And change the setting:

I confused Kubuntu’s with openSUSE’s file tree. That’s what happens when you’re working under stress. I found it. I guess the other partitions weren’t mounted because otherwise I should have found menu.lst anyway. Strangely enough, when I open menu.lst with kate, it’s empty, although it has a size of 1.2 KB.

Windows is set as standard in Grub, so I can’t choose openSUSE with a timeout of 0 seconds. For some reason, I can’t write in openSUSE’s /boot/grub folder (the real folder, this time!) with my Kubuntu live CD. I guess it’s mounted as standard user, although writing requires root permissions.

I got it. I opened Dolphin as root and changed the setting back. Thank your for your help.