1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Windows wont load, grub error?

Discussion in 'Linux and Unix' started by blue4paper, Apr 12, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. blue4paper

    blue4paper Thread Starter

    Joined:
    Aug 10, 2007
    Messages:
    129
    My windows has this error when i try and load it "Error 13 Invalid or unsupported executable format" i've googled around and found lots of people had this problem and it all resulted from grub issues. Unfortunately i couldn't find any good solutions seeing as people had different scenarios. Anyways here's a copy of my grub.

     
  2. jrbuergel

    jrbuergel

    Joined:
    Jan 17, 2004
    Messages:
    800
    First Name:
    Jim
    Most likely the grub issue is with that entry titled; "root", which is just above your Windows XP boot information. If you just have Ubuntu and XP installed and dual booting, then just edit the menu.lst file which is located in; /boot/grub/, and you need to be logged in as root. I did this with this typed in a command prompt terminal window; sudo gedit /boot/grub/menu.lst , and this will open your grug file to edit as root, and do a save, then close it. Also here is a good and helpful Linux forum site; http://www.linuxquestions.org/questions/
     
  3. saikee

    saikee

    Joined:
    Jun 11, 2004
    Messages:
    3,887
    The OP has already posted the menu.lst in Post #1.

    As usual the OP has done most other posters have done, just reported the error and showed insufficient detail to enable others to fix it.

    The error "Error 13 Invalid or unsupported executable format" actually means Grub cannot execute the "chainloader +1" command. To put it bluntly the partition (hd0,0) Grub has been asked to chainload is not chainloadable. In chainloading Grub is asked to surrend its control to another boot loader which in this case should be XP's NTLDR. Grub is ready to pass over the control but no one is available to receive it.

    It is likely the 1st partition of the 1st disk or (hd0,0) in Grub's convention, is a recovery partition of one that stored computer's hardware drivers. Thus if the correct partition is specified Xp will boot because by default it "always" has NTLDR installed in its boot sector.

    To cure it one needs to know which partition has XP. The easiest is to post the partition details by commands in Ubuntu terminal
    Code:
    sudo su
    fdisk -l
    The partition that has type 7, indicating it is a ntfs partition, and shown "active", attached by a *, will be the bootable Xp partition.
     
  4. blue4paper

    blue4paper Thread Starter

    Joined:
    Aug 10, 2007
    Messages:
    129
    heres my fdisk -l

    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xc55dc55d

    Device Boot Start End Blocks Id System
    /dev/sda1 * 8551 19457 87610446 7 HPFS/NTFS
    /dev/sda2 2 8550 68669842+ f W95 Ext'd (LBA)
    /dev/sda5 2 263 2104483+ 82 Linux swap / Solaris
    /dev/sda6 264 8550 66565296 83 Linux
     
  5. dick471

    dick471

    Joined:
    Oct 27, 2004
    Messages:
    191
    I would do a search for "Super Grub" and put on a CD(bootable). This will boot to anything (O/S) you have in the computer. Works great!
     
  6. blue4paper

    blue4paper Thread Starter

    Joined:
    Aug 10, 2007
    Messages:
    129
    thanks for suggestions, unfortunately didn't work. I fiddled around with just about every option in Super Grub and windows still didn't boot.
     
  7. saikee

    saikee

    Joined:
    Jun 11, 2004
    Messages:
    3,887
    Your menu.lst actually proves I was wrong because your (hd0,0) is indeed Type 7 and has a *.
    Code:
    /dev/sda1 [COLOR="Red"]*[/COLOR] 8551 19457 87610446 [COLOR="Purple"]7[/COLOR] HPFS/NTFS
    In that case can I ask you to boot the XP up manually?

    As you can post the Ubunu's menu.lst this make me think your Grub is displaying the menu.lst and you can boot to Ubuntu. It is just the XP that is not working, right?

    To boot operating systems manually you press "c" key and get a Grub prompt. No matter how hard I try I cannot find a working PC system that cannot be booted by a Grub prompt! You can boot any system manually using the commands in menu.lst by omitting the "title" statement and finish lastly with an extra "boot" statement. Any line in menu.lst with a "#" in front is not acted by Grub.

    You first ask Grub to verify the partition details by command
    Code:
    geometry (hd0)
    This command produces the same output as "fdisk -l" in Linux except the partition numbering system is in Grub's convention. You then try to fire up XP by these command, one line at a time
    Code:
    root (hd0,0)
    chainloader +1
    boot
    The above is virtually identical to the command in menu.lst. I did not use "savedefault" because there is no need. I omitted "makeactive" because (hd0,0) is already active, as confirmed by the *.

    Grub will respond to each line. It will confirm Type 7 partition is found after the "root (hd0,0)" command. No message is acceptable. A problem is always responded with a message.

    If it doesn't object to the 2nd line of "chainloader +1" then Xp should fire up by the 3rd line "boot".

    If the same error 13 as before is reported after the 2nd line then your NTLDR has been accidentally damaged and you need to restore it by "fixboot" and/or "fixmbr" command using the XP installation CD.

    If Xp can be booted manually but not automatically by menu.lst then you need to restore Grub. Instruction to do this will be provided if you need it.

    Let's us know how you get on.

    "Super Grub" is to let a middleman in between you and Grub. You can get everything you want from a Grub prompt because you are talking to Grub directly equivalent to pointing a gun to its head! Why people want to do it through a middleman I never know.
     
  8. webstarcool

    webstarcool

    Joined:
    Aug 4, 2008
    Messages:
    1
    Hi there,

    Thanks for your advice. I had the same problem with the 'Error 13' during boot. It initially happened when I tried to alter the bootloader with a program kalled QGrub (or something like that). I wanted to change the default boot as it was starting the memtest as default instead of Windows XP. After changing the boot default to XP I restarted and it would fail with the 'error 13'.

    Now I just tried your advice with the manual boot and it seems to work (I'm typing this from Windows XP).

    But hwo can I restore the original menu.lst, so I don't have to manually start my windows XP?

    Thanks,

    P
     
  9. saikee

    saikee

    Joined:
    Jun 11, 2004
    Messages:
    3,887
    If you know to boot a system manually with Grub you can also ask it to display the menu.lst.

    Say your Linux is in the 2nd partition of the 1st disk known to Grub as (hd0,1) as it counts from zero. Grub will display the menu.lst on the screen if you issue this command
    Code:
    cat (hd0,1)/boot/grub/menu.lst
    You can then type the booting instructions manually, word for word and line by line, and the system will fire up when you give the green light to boot by adding this coomand last
    Code:
    boot
    You can modify menu.lst anyway you want using an editor.
     
  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/702889

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice