Stuck Grub -- need new menu.lst

Hi, I’m trying to solve this hypothetical situation which I have made real on a spare computer:
I have openSUSE 11.0 KDE3.5.9 installed and it won’t boot. I need to get an assisted boot into openSUSE so I can use Yast to re-initialise the bootloader.

The install is on sda11.

I don’t have the full install DVD. I do have a live CD. I have booted the live CD and mounted the damaged openSUSE 11/0 installation and inspected the directory /boot/grub/. The file menu.lst is corrupted.

So I reinstalled Grub by opening a terminal in the live CD and issuing these commands:

root (hd0,10)
setup (hdo)

This gets me a new Grub install in the Master Boot Record. But when I boot I only get the Grub prompt:


Because menu.lst is stoll corrupted.

The question is: how can I regenerate the menu.lst in the installation directory /boot/grub/ on sda (i.e. regenerate it from the live CD) so I can boot openSUSE again?

Surely I don’t have to edit one in by hand?


  1. It should be possible to manually edit the menu.lst file from the Opensuse 11 live cd as you said.

  2. Another alternative is to use the SuperGrubDisk Super Grub Disk Webpage and repair/reinstall GRUB.

  3. It might be possible to do it with a SLAX live cd, since SLAX always runs as root…just a thought.

i have win-opensuse-ubuntu on my system, with ubuntu installed inside the windows filesystem as a seperate directory
i once spoiled ubuntu installation of my system and at that time i was very new to the terminology hda hdb etc! then i started typing boot config. commands at the grub prompt and luckily it worked…
alternatively you can try typing the boot commands at the suse prompt
you need to give values for

root (hd2,0)
kernel /ubuntu/disks/boot/vmlinuz-2.6.24-16-generic root=UUID=04F21FE3F21FD82E loop=/ubuntu/disks/root.disk ro quiet splash
initrd /ubuntu/disks/boot/initrd.img-2.6.24-16-generic

grub allows you to type these… in my case after repeated failues (each unsuccessful try ended with the “three finger salute” CTRL ALT DEL) but finally i was able to boot into my ubuntu linux and then i corrected my menu.lst file

Thanks to you both, to CurvyTail for advocating the edit and to tonytons for the idea of supplying the kernel and the initrd, which prompted the solution below. I edited menu.lst from a live CD and then rebooted fine. This generic entry worked:

title Recovery Generic Boot
root (hd0,10)
kernel /boot/vmlinuz
initrd /boot/initrd

Which is very valuable information leading to a method for restoring booting to openSUSE 11.0 if a user doesn’t have the DVD install disk, just any old live distro will do.


Since the boot grub dumped you into the grub shell due to the corrupt menu.lst, why didn’t you just enter the same commands there in the shell, boot, and then edit menu.lst. What am I missing?

there is nothing missing in there…
just that a long route was followed!
you can always boot into the system from a live-cd and then make corrections to /boot/grub/menu.lst
in this case since the person is very sure about the existence of linux files on
root (hd0,10)

you can edit things more confidently.
in my case it was a bit complicated :
HDD1 - part.1: fat32
- part.2: fat32
SATA1 - part1. ntfs
SATA2 - part1. ntfs
and in SATA2 was an Ubuntu installation within NTFS filesystem as a folder(i never believed this could happen unless i actually installed and saw it working)
and thats where my system somehow messed up with all that…
i had no idea of how to mount this type of Ubuntu installation on a live SuseLinux CD or other… so i followed the classical approach.

anyways what matters is : the thing should work!
it has worked! thats the good part!
So all is well that ends well!!

Because you only just now suggested it.

Do you mean that while in a live CD you can at some point issue command “boot” in a console and transfer outta there into booting up openSUSE on your hard drive?? That would save a whole lot of need for users to dld supergrub disks and openSUSE install media just to get a leg up into their damaged openSUSE.

Oh, sorry about that :smiley: I had assumed (there’s that word again) that you were purposely looking for an alternative method which would automatically regen menu.lst. Serves me right for being overly literal. (I did get YaST on the live-CD to generate a new menu.lst but it needed to be modified because YaST couldn’t see the root partition; I was able to do so, save, and copy it to the mounted root partition. Another method, but there are better alternatives.)

Along the lines of what tonytons already pointed out, the grub shell is quite powerful and has it’s own commands to troubleshoot and let it do some work for you.

It’s a read, but have a look here how to play around in the grub shell :
Grub From the Ground Up