Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Empty menu.lst - can't boot

  1. #1

    Default Empty menu.lst - can't boot

    Hello and apologies if this is a common problem. I've searched around, but there are so many variations on the theme of dual-booting that it's hard to be sure. Anyway, I just can't even get as far as GRUB loading up ...

    I've installed OpenSuse KDE 4.2 from here: "KDE Four Live" CD

    It is onto an extended partition, with XP and Windows 7 beta on two other partitions. I installed Grub to the root partition by ticking the "root" and "extended" options in the installer. Experience tells me that installing to the MBR is more likely to let my mess up XP booting, which leads to fights with my wife!

    I can't get the OpenSuse partition to boot, however. I am pointing boot.ini at my Linux partition, but can't seem to get anywhere. Both the bootpart route (which looks for Linux partitions from within XP) and the dd if=/dev/sda of=boot.lnx route (Booting Linux from Windows NT/2000's Boot Manager) aren't working for me.

    It seems that the system is failing to find a workable GRUB to load up. Using the OpenSuse liveCD to look at my installation, it seems that my menu.lst file is completely empty. Seems very odd and may be a big clue to my problem.

    The other thing that I wonder about is whether using an extended partition isn't helping. Not sure whether to point boot.ini at the "extended partition" (sda2 in my case) or the logical partition (sda5) to look for GRUB.

    Can anyone help me out? All contributions gratefully received!

    fdisk -l gives me this :-

    Code:
    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xd9b9d9b9
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1         261     2096451   82  Linux swap / Solaris
    /dev/sda2             262        1536    10241437+   f  W95 Ext'd (LBA)
    /dev/sda3            1537        9185    61440592+   7  HPFS/NTFS
    /dev/sda4            9186       14593    43439760    7  HPFS/NTFS
    /dev/sda5             262         898     5116671   83  Linux
    /dev/sda6             899        1536     5124703+  83  Linux
    
    Disk /dev/sdb: 250.0 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x8f898f89
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *           1        6374    51199123+   7  HPFS/NTFS
    /dev/sdb2            6375       19122   102398310    7  HPFS/NTFS
    /dev/sdb3           19123       30401    90598567+   7  HPFS/NTFS
    
    Disk /dev/sdc: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x4a5e8b0b
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1   *           1        2550    20482843+   7  HPFS/NTFS
    /dev/sdc2            2551        9729    57665317+   7  HPFS/NTFS

  2. #2

    Default Re: Empty menu.lst - can't boot


  3. #3
    Join Date
    Jun 2008
    Location
    Atlanta, Georgia, USA
    Posts
    2,429

    Default Re: Empty menu.lst - can't boot

    There was a bug in YaST Boot Loader that wipes out menu.lst - that is what I would suspect first. Are you able to boot the machine getting the grub prompt? If you can, I can give you the commands to boot openSUSE and once in you can install the patches and repair menu.lst. (If menu.lst is missing, the above links won't help you.) If you can't, I can help you fix it with the LiveCD.

  4. #4

    Default Re: Empty menu.lst - can't boot

    Ah, mingus, it sounds like you might be on the right track.

    Try what I might I just can't get anything to stick in menu.lst (tried running Yast from liveCD, using install DVD to repair install, always get a blank menu.lst).

    I can't get into GRUB, but if you could help me write the correct line(s) in my menu.lst then I'm able to mount/edit it using the liveCD. Just don't know what to put in there at the moment.

    Would be much appreciated!

  5. #5
    Join Date
    Jun 2008
    Location
    Atlanta, Georgia, USA
    Posts
    2,429

    Default Re: Empty menu.lst - can't boot

    Won't work running YaST from the LiveCD because it runs in RAM without a mounted root file system, and won't work from the DVD because it contains the bug that was fixed. Even so, yes, we can rebuild it from the LiveCD. But how is that going to work if grub is not called at all when you start the machine? - we may need to fix that, too. You are now booting from either sdb or sdc. What happens if you set the bios to boot from sda? Regardless, I'll need you to do the following before repairing menu.lst - boot the LiveCD, open a terminal, then do:

    Code:
    su -
    mount -t ext3 /dev/sda5 /mnt
    cat /mnt/boot/grub/device.map
    cat /mnt/etc/grub.conf
    Post the output back here.

  6. #6

    Default Re: Empty menu.lst - can't boot

    Okay, thanks. I'll run those commands when I'm back home.

    In the meantime: if I use the "dd if=/dev/sda5 of=boot.lnx" route then it tries to pull up GRUB, it's just that the screen is almost blank (just says "GRUB") in the corner. Don't know if that helps.

    It is certainly (well, almost certainly) trying to boot from sda either via the "dd if=..." route or because I set it through XP using bootpart (which creates a boot.lnx file that points to any chosen partition, which is then called from boot.ini). At the moment it gives me a "no system disk" kind of an error. Again, I assumed that this was all related, with GRUB just not having anything in it.

    What would help me get to the next stage, maybe, would be if I knew the answer to these two questions:
    1) Should I be pointing the boot manager at the extended partition (sda2) or the logical partition where my root folder, "/", is located?

    2) Should I be ticking the "install boot loader in root partition" and the "extended partition" boxes in the OpenSuse boot manager installer?

    Thank-you very much for your help with all of this. It is much appreciated.

  7. #7
    Join Date
    Jun 2008
    Location
    Atlanta, Georgia, USA
    Posts
    2,429

    Default Re: Empty menu.lst - can't boot

    if I use the "dd if=/dev/sda5 of=boot.lnx" . . .
    I presume you know this syntax is incomplete; it needs to have "bs=512 count=1" at the end. Also, if you are using the ntldr method with boot.lnx in your Windows root directory, then all ntldr is doing is transferring control to the code in that copied sector, so its grub's stage1 must have the correct embedded pointer to find its stage2. I haven't tried using this method when the sector is from an extended or logical partition; I suspect that will work as long as it is on the same disk. But if you are booting from sdb or sdc and the boot sector was copied from sda, then I suspect this technique will not work; it may not be able to span disks.

    In the meantime: if I use the "dd if=/dev/sda5 of=boot.lnx" route then it tries to pull up GRUB, it's just that the screen is almost blank (just says "GRUB") in the corner. Don't know if that helps.
    This usually means that grub stage1 is in the sda5 boot sector but that its embedded pointer to find stage2 is broken. Again, it may be because for it to work it must span the disks, and it may not be able to (ntldr has trouble with this). Note: If your intention is to eventually use W7, then it's boot manager is much more flexible and powerful than XP's; I would seriously consider using it to control all the booting on the machine.

    Code:
    At the moment it gives me a "no system disk" kind of an error.
    A "no system disk" error is thrown by the bios when it cannot find bootstrap code in the boot disk's MBR.

    1) Should I be pointing the boot manager at the extended partition (sda2) or the logical partition where my root folder, "/", is located?
    Depends on which partition's boot sector holds stage1. Usually stage1 is put in the extended primary's boot sector only when there is "generic" boot code in the MBR; that code will look for the "active" partition and transfer control to its boot sector. If stage1 is being "chainloaded" from another loader (as you are trying to do) then usually it is installed in the root partition boot sector.

    2) Should I be ticking the "install boot loader in root partition" and the "extended partition" boxes in the OpenSuse boot manager installer?
    If you selected both, then grub stage1 has been installed in 2 different boot sectors (there can be reasons for doing this). In both sectors, the stage1 will point to the same location for stage2. And so either should work for a "chainload" boot - assuming there isn't, again, an issue with spanning the disks.

  8. #8
    Join Date
    Jun 2008
    Location
    Atlanta, Georgia, USA
    Posts
    2,429

    Default Re: Empty menu.lst - can't boot

    Also, bear in mind with all this that grub at installation depends on the disk alignment in /boot/grub/device.map matching up with the bios boot disk configuration, and that if such is changed, that grub gets reinstalled and/or its menu.lst file reconfigured accordingly. Grub cannot know the configuration as the bios does not pass this data, so it depends on the user setting up device.map correctly. Menu.lst will use corresponding notation.

  9. #9

    Default Re: Empty menu.lst - can't boot

    Okay, I've put in the code you asked for mingus. Output is ...

    Code:
    linux@linux:~> su -
    linux:~ # mount -t ext3 /dev/sda5 /mnt
    linux:~ # cat /mnt/boot/grub/device.map
    (hd2)   /dev/disk/by-id/ata-ST380013AS_3JV32XD1
    (hd0)   /dev/disk/by-id/ata-SAMSUNG_SP2504C_S09QJ1LL946290
    (hd1)   /dev/disk/by-id/ata-ST3120827AS_5MS06636
    linux:~ # cat /mnt/etc/grub.conf
    setup --stage2=/boot/grub/stage2 --force-lba (hd1,4) (hd1,4)
    quit
    linux:~ #
    Does that help?

    Again, thanks again for being so patient mingus. I can see you're already answering this same sort of question for lots of people yet you take the time to answer in great detail for me. Many thanks. Makes for a much more pleasant experience than people just hurling random code around without explaining what's going on.

  10. #10

    Default Re: Empty menu.lst - can't boot

    A couple more things ...

    Doesn't matter what order I put my drives in using the BIOS. If I choose sda (the 120Gb drive) it goes to the normal bootloader (presumably the 120Gb one is passed over as it has no MBR). If I choose sdc (the 80Gb) then it boots straight to Windows which must be because it's still got the old MBR from when this was my primary XP disk.

    I probably won't use W7 in the end, but I have installed the beta. So for now I'm happy to use the W7 bootloader to tide me over until the beta expires in August, so if it makes it easier to put GRUB into action (e.g. avoids shrinking my XP partition and putting in a /boot partition) then that would suit me. I'm currently chainloading W7 bootloader, then XP bootloader (!).

    I'd be happy to make sda my first disk in the BIOS and write a MBR (pointing to GRUB) on that one. If it all goes wrong, all I'd have to do is make my Windows disk (sdb) the first in the BIOS and I'd be back working again, right?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •