Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: [SOLVED] Grub Error 13: Same hard drive, separate partitions

  1. #1
    Join Date
    Dec 2006
    Beans
    74

    [SOLVED] Grub Error 13: Same hard drive, separate partitions

    Hi guys, wondering if you could help with this problem my computer developed.

    I've had dual-boot XP and Ubuntu for a while now, everything worked fine. For some reason, within the past few weeks, Grub cannot boot into Windows XP.

    Error 13: Invalid or Unsupported Executable format.

    I did some research and here are results for fdisk -l and menu.lst:

    had to do sudo fdisk -l (note: fdisk -l did not work)
    fdisk - l

    Cannot open /dev/sda
    Cannot Open /dev/sdb
    sudo fdisk -l
    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x08000000

    Device Boot Start End Blocks Id System
    /dev/sda1 * 14267 14594 2620416 c W95 FAT32 (LBA)
    /dev/sda2 2551 13172 85321215 83 Linux
    /dev/sda3 14161 14593 3478072+ 5 Extended
    /dev/sda4 13173 14160 7936110 83 Linux
    /dev/sda5 14448 14593 1172713+ 82 Linux swap / Solaris
    /dev/sda6 14161 14447 2305264+ 82 Linux swap / Solaris

    Partition table entries are not in disk order

    Disk /dev/sdb: 200.0 GB, 200049647616 bytes
    255 heads, 63 sectors/track, 24321 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xad6ce434

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 24321 195358401 83 Linux
    menu.lst
    ## ## End Default Options ##

    title Ubuntu 8.10, kernel 2.6.27-9-generic
    uuid 339bab9c-9a2a-438f-a7d2-72516e5144b6
    kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=339bab9c-9a2a-438f-a7d2-72516e5144b6 ro quiet splash
    initrd /boot/initrd.img-2.6.27-9-generic
    quiet

    title Ubuntu 8.10, kernel 2.6.27-9-generic (recovery mode)
    uuid 339bab9c-9a2a-438f-a7d2-72516e5144b6
    kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=339bab9c-9a2a-438f-a7d2-72516e5144b6 ro single
    initrd /boot/initrd.img-2.6.27-9-generic

    title Ubuntu 8.10, kernel 2.6.27-7-generic
    uuid 339bab9c-9a2a-438f-a7d2-72516e5144b6
    kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=339bab9c-9a2a-438f-a7d2-72516e5144b6 ro quiet splash
    initrd /boot/initrd.img-2.6.27-7-generic
    quiet

    title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
    uuid 339bab9c-9a2a-438f-a7d2-72516e5144b6
    kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=339bab9c-9a2a-438f-a7d2-72516e5144b6 ro single
    initrd /boot/initrd.img-2.6.27-7-generic

    title Ubuntu 8.10, memtest86+
    uuid 339bab9c-9a2a-438f-a7d2-72516e5144b6
    kernel /boot/memtest86+.bin
    quiet

    ### END DEBIAN AUTOMAGIC KERNELS LIST

    # This is a divider, added to separate the menu items below from the Debian
    # ones.
    title Other operating systems:
    root


    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/sda1
    title Microsoft Windows XP Professional
    root (hd0,0)
    savedefault
    makeactive
    chainloader +1
    I'm pretty sure /dev/sda3 is my Windows Drive.. but not sure how whether booting to hd0,0 is right. I'm not sure what could have rewritten my menu.lst file as it was working before.. Maybe NTFS configuration tool which I installed recently?

    Also, this is on the same laptop harddrive, just partitioned out into separate drives.

    Any help or perspective is appreciated! I really can't afford to mess up my Ubuntu environment right now.
    Thank you.

  2. #2
    Join Date
    Apr 2007
    Beans
    547

    Re: Grub Error 13: Same hard drive, separate partitions

    get advanced supergrub to fix mbr

    may need live cd such as knoppix to edit boot files to set the partitions and boot stages right

  3. #3
    Join Date
    Aug 2008
    Location
    Jawja
    Beans
    2,486
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Grub Error 13: Same hard drive, separate partitions

    Quote Originally Posted by airjaw View Post
    Hi guys, wondering if you could help with this problem my computer developed.

    I've had dual-boot XP and Ubuntu for a while now, everything worked fine. For some reason, within the past few weeks, Grub cannot boot into Windows XP.

    Error 13: Invalid or Unsupported Executable format.

    I did some research and here are results for fdisk -l and menu.lst:

    had to do sudo fdisk -l (note: fdisk -l did not work)
    fdisk - l



    sudo fdisk -l


    menu.lst


    I'm pretty sure /dev/sda3 is my Windows Drive.. but not sure how whether booting to hd0,0 is right. I'm not sure what could have rewritten my menu.lst file as it was working before.. Maybe NTFS configuration tool which I installed recently?

    Also, this is on the same laptop harddrive, just partitioned out into separate drives.

    Any help or perspective is appreciated! I really can't afford to mess up my Ubuntu environment right now.
    Thank you.

    Try editing (hd0,0) to (hd0,2) and see what happens. You can first try this from the grub menu by highlighting the XP selection and pressing "e". Then highlight the (hd0,0) line and pressing "e" again. Then change to (hd0,2). You then can press "b" to boot the change.

  4. #4
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Grub Error 13: Same hard drive, separate partitions

    How about opening a terminal (Applications > Acceossories > Terminal), and please post the output of:
    Code:
    sudo mkdir /mnt/sda1 /mnt/sda2
    sudo mount /dev/sda1 /mnt/sda1
    sudo mount /dev/sda2 /mnt/sda2
    ls -l /mnt/sda1 /mnt/sda2
    And we can work from there if you want.

  5. #5
    Join Date
    Aug 2008
    Location
    Jawja
    Beans
    2,486
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Grub Error 13: Same hard drive, separate partitions

    Quote Originally Posted by caljohnsmith View Post
    How about opening a terminal (Applications > Acceossories > Terminal), and please post the output of:
    Code:
    sudo mkdir /mnt/sda1 /mnt/sda2
    sudo mount /dev/sda1 /mnt/sda1
    sudo mount /dev/sda2 /mnt/sda2
    ls -l /mnt/sda1 /mnt/sda2
    And we can work from there if you want.
    caljohnsmith will fix you up for sure.

  6. #6
    Join Date
    Dec 2006
    Beans
    74

    Re: Grub Error 13: Same hard drive, separate partitions

    Quote Originally Posted by 73ckn797 View Post
    Try editing (hd0,0) to (hd0,2) and see what happens. You can first try this from the grub menu by highlighting the XP selection and pressing "e". Then highlight the (hd0,0) line and pressing "e" again. Then change to (hd0,2). You then can press "b" to boot the change.
    Thanks for advice. Tried that,
    got
    hd0,2
    Error 12: Invalid device requested
    linux boots to hd0, 3

    sudo mount /dev/sda1 /mnt/sda1
    mount: you must specify the filesystem type
    sudo mkdir /mnt/sda3
    sudo mount -t Extended /dev/sda3 /mnt/sda3
    mount: unknown filesystem type 'Extended'
    sudo mount -t ntfs /dev/sda3 /mnt/sda3
    Failed to mount '/dev/sda3': Invalid argument
    The device '/dev/sda3' doesn't have a valid NTFS.
    I should also add that I have never been able to access my Windows NTFS drive from within Ubuntu. For some reason it never shows up.
    Last edited by airjaw; December 19th, 2008 at 09:25 PM.

  7. #7
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Grub Error 13: Same hard drive, separate partitions

    OK, please post the output of:
    Code:
    sudo blkid
    sudo mount -t vfat -o force /dev/sda1 /mnt/sda1
    sudo mount /dev/sda2 /mnt/sda2
    ls -l /mnt/sda1 /mnt/sda2

  8. #8
    Join Date
    Dec 2006
    Beans
    74

    Re: Grub Error 13: Same hard drive, separate partitions

    sudo blkid
    /dev/sda2: UUID="652f78cc-09d3-4f4e-b861-6b7d1cbc69ab" TYPE="ext3"
    /dev/sda4: UUID="339bab9c-9a2a-438f-a7d2-72516e5144b6" TYPE="ext3"
    /dev/sda5: TYPE="swap" UUID="315badc5-b892-4cad-b994-500b4daa9929"
    /dev/sda6: TYPE="swap" UUID="c7080b1b-92c8-4237-9505-08519ff3a851"
    /dev/sdb1: LABEL="Backup" UUID="345587f1-8eef-42d2-9648-d6047f6fc5bc" SEC_TYPE="ext2" TYPE="ext3"
    sudo mount -t vfat -o force /dev/sda1 /mnt/sda1
    mount: wrong fs type, bad option, bad superblock on /dev/sda1,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so
    sudo mount /dev/sda2 /mnt/sda2
    Seemed to have worked.

    ls -l /mnt/sda1 /mnt/sda2
    /mnt/sda1:
    total 0

    /mnt/sda2:
    total 20
    drwxr-xr-x 57 airjaw airjaw 4096 2008-12-19 15:16 airjaw
    drwx------ 2 root root 16384 2008-11-18 14:47 lost+found

  9. #9
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Grub Error 13: Same hard drive, separate partitions

    When was the last time you were able to boot successfully into Windows, and what have you done on your computer since then? You don't have any NTFS/FAT partitions, which is what Windows would use. Your sda1 partition is labeled as FAT in the partition table, but blkid says the file system is ext2. Also, sda1 is only 2.6 GB, so that's not enough to hold Windows. I thought that maybe your sda2 partition could possibly have Windows, because I figured there might be a mistake in the partition table about it being labeled as a linux file system. But blkid says sda2 is ext3, and also sda2 doesn't have your Windows installation; the directory listing only showed "airjaw" and "lost+found" folders. Were you previously able to boot Windows from your Grub menu, and have you made any changes to your Grub's menu.lst since then?

    In order to get a clearer picture of your setup, how about doing:
    Code:
    cd ~/Desktop && wget 'http://home.comcast.net/~ubuntu_grub/boot_info_script.txt' && sudo bash boot_info_script.txt
    That will create a "boot_info_results.txt" file in the same directory from where the script is run, namely your desktop; please copy/paste the contents of that file to your next post. That will help clarify your setup.

  10. #10
    Join Date
    Dec 2006
    Beans
    74

    Re: Grub Error 13: Same hard drive, separate partitions

    Thanks for all the continued help..

    I last booted into windows several weeks ago.
    I can't think of anything that I have done to mess anything up.
    All I've done since then is install software and Ubuntu updates.

    here is the rundown of my devices:

    sda1 : not sure what this is
    sda2 : my /home partition, 86GB
    sda3 : pretty sure this is my windows partition, 35GB
    sda4 : linux partition, /
    sda5,6: swap partitions
    sdb : my external hard drive, ext3


    Grub is installed in the MBR of /dev/sda and looks on the same drive in partition #4 for its boot files.
    No known boot loader is installed in the MBR of /dev/sdb

    sda1:
    File system: Extended Partition

    sda2:
    File system: ext3
    Boot sector type: Unknown
    Boot sector info:
    Operating System:
    Boot files/directories present:

    sda3:
    File system: Extended Partition

    sda4:
    File system: ext3
    Boot sector type: Unknown
    Boot sector info:
    Operating System: Linux
    Boot files/directories present: /boot/grub/menu.lst /boot /boot/grub

    sda5:
    File system: swap

    sda6:
    File system: swap

    sdb1:
    File system: ext3
    Boot sector type: Unknown
    Boot sector info:
    Operating System:
    Boot files/directories present:


    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x08000000

    Device Boot Start End Blocks Id System
    /dev/sda1 * 229197824 234438655 2620416 c W95 FAT32 (LBA)
    /dev/sda2 40965750 211608179 85321215 83 Linux
    /dev/sda3 227480400 234436544 3478072+ 5 Extended
    /dev/sda4 211608180 227480399 7936110 83 Linux
    /dev/sda5 232091118 234436544 1172713+ 82 Linux swap / Solaris
    /dev/sda6 227480526 232091054 2305264+ 82 Linux swap / Solaris

    Partition table entries are not in disk order

    Disk /dev/sdb: 200.0 GB, 200049647616 bytes
    255 heads, 63 sectors/track, 24321 cylinders, total 390721968 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0xad6ce434

    Device Boot Start End Blocks Id System
    /dev/sdb1 63 390716864 195358401 83 Linux
    # partition table of /dev/sda
    unit: sectors

    /dev/sda1 : start=229197824, size= 5240832, Id= c, bootable
    /dev/sda2 : start= 40965750, size=170642430, Id=83
    /dev/sda3 : start=227480400, size= 6956145, Id= 5
    /dev/sda4 : start=211608180, size= 15872220, Id=83
    /dev/sda5 : start=232091118, size= 2345427, Id=82
    /dev/sda6 : start=227480526, size= 4610529, Id=82
    # partition table of /dev/sdb
    unit: sectors

    /dev/sdb1 : start= 63, size=390716802, Id=83
    /dev/sdb2 : start= 0, size= 0, Id= 0
    /dev/sdb3 : start= 0, size= 0, Id= 0
    /dev/sdb4 : start= 0, size= 0, Id= 0

    sda4/boot/grub/menu.lst

    # menu.lst - See: grub(8), info grub, update-grub(8)
    # grub-install(8), grub-floppy(8),
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.

    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    #
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    # WARNING: If you are using dmraid do not use 'savedefault' or your
    # array will desync and will not let you boot your system.
    default 0

    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 10

    ## hiddenmenu
    # Hides the menu by default (press ESC to see the menu)
    #hiddenmenu

    # Pretty colours
    #color cyan/blue white/blue

    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
    # password topsecret

    #
    # examples
    #
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    #
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    #

    #
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

    ### BEGIN AUTOMAGIC KERNELS LIST
    ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
    ## by the debian update-grub script except for the default options below

    ## DO NOT UNCOMMENT THEM, Just edit them to your needs

    ## ## Start Default Options ##
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specific kernels use kopt_x_y_z
    ## where x.y.z is kernel version. Minor versions can be omitted.
    ## e.g. kopt=root=/dev/hda1 ro
    ## kopt_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=UUID=339bab9c-9a2a-438f-a7d2-72516e5144b6 ro

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=339bab9c-9a2a-438f-a7d2-72516e5144b6

    ## should update-grub create alternative automagic boot options
    ## e.g. alternative=true
    ## alternative=false
    # alternative=true

    ## should update-grub lock alternative automagic boot options
    ## e.g. lockalternative=true
    ## lockalternative=false
    # lockalternative=false

    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=quiet splash

    ## should update-grub lock old automagic boot options
    ## e.g. lockold=false
    ## lockold=true
    # lockold=false

    ## Xen hypervisor options to use with the default Xen boot option
    # xenhopt=

    ## Xen Linux kernel options to use with the default Xen boot option
    # xenkopt=console=tty0

    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(recovery) single
    # altoptions=(recovery mode) single

    ## controls how many kernels should be put into the menu.lst
    ## only counts the first occurence of a kernel, not the
    ## alternative kernel options
    ## e.g. howmany=all
    ## howmany=7
    # howmany=all

    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true

    ## should update-grub adjust the value of the default booted system
    ## can be true or false
    # updatedefaultentry=false

    ## should update-grub add savedefault to the default options
    ## can be true or false
    # savedefault=false

    ## ## End Default Options ##

    title Ubuntu 8.10, kernel 2.6.27-9-generic
    uuid 339bab9c-9a2a-438f-a7d2-72516e5144b6
    kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=339bab9c-9a2a-438f-a7d2-72516e5144b6 ro quiet splash
    initrd /boot/initrd.img-2.6.27-9-generic
    quiet

    title Ubuntu 8.10, kernel 2.6.27-9-generic (recovery mode)
    uuid 339bab9c-9a2a-438f-a7d2-72516e5144b6
    kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=339bab9c-9a2a-438f-a7d2-72516e5144b6 ro single
    initrd /boot/initrd.img-2.6.27-9-generic

    title Ubuntu 8.10, kernel 2.6.27-7-generic
    uuid 339bab9c-9a2a-438f-a7d2-72516e5144b6
    kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=339bab9c-9a2a-438f-a7d2-72516e5144b6 ro quiet splash
    initrd /boot/initrd.img-2.6.27-7-generic
    quiet

    title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
    uuid 339bab9c-9a2a-438f-a7d2-72516e5144b6
    kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=339bab9c-9a2a-438f-a7d2-72516e5144b6 ro single
    initrd /boot/initrd.img-2.6.27-7-generic

    title Ubuntu 8.10, memtest86+
    uuid 339bab9c-9a2a-438f-a7d2-72516e5144b6
    kernel /boot/memtest86+.bin
    quiet

    ### END DEBIAN AUTOMAGIC KERNELS LIST

    # This is a divider, added to separate the menu items below from the Debian
    # ones.
    title Other operating systems:
    root


    # This entry automatically added by the Debian installer for a non-linux OS
    # on /dev/sda1
    title Microsoft Windows XP Professional
    root (hd0,0)
    savedefault
    makeactive
    chainloader +1


    sda4/boot

    total 23764
    drwxr-xr-x 3 root root 4096 2008-12-16 17:43 .
    drwxr-xr-x 21 root root 4096 2008-12-05 14:57 ..
    -rw-r--r-- 1 root root 507665 2008-11-04 16:00 abi-2.6.27-7-generic
    -rw-r--r-- 1 root root 507665 2008-11-20 18:46 abi-2.6.27-9-generic
    -rw-r--r-- 1 root root 91364 2008-11-04 16:00 config-2.6.27-7-generic
    -rw-r--r-- 1 root root 91364 2008-11-20 18:46 config-2.6.27-9-generic
    drwxr-xr-x 2 root root 4096 2008-11-29 14:06 grub
    -rw-r--r-- 1 root root 8182593 2008-11-26 18:21 initrd.img-2.6.27-7-generic
    -rw-r--r-- 1 root root 8182884 2008-12-16 17:43 initrd.img-2.6.27-9-generic
    -rw-r--r-- 1 root root 124152 2008-09-11 16:11 memtest86+.bin
    -rw-r--r-- 1 root root 1029585 2008-11-04 16:00 System.map-2.6.27-7-generic
    -rw-r--r-- 1 root root 1029585 2008-11-20 18:46 System.map-2.6.27-9-generic
    -rw-r--r-- 1 root root 1073 2008-11-04 16:02 vmcoreinfo-2.6.27-7-generic
    -rw-r--r-- 1 root root 1073 2008-11-20 18:48 vmcoreinfo-2.6.27-9-generic
    -rw-r--r-- 1 root root 2244464 2008-11-04 16:00 vmlinuz-2.6.27-7-generic
    -rw-r--r-- 1 root root 2244304 2008-11-20 18:46 vmlinuz-2.6.27-9-generic

    sda4/boot/grub

    total 224
    drwxr-xr-x 2 root root 4096 2008-11-29 14:06 .
    drwxr-xr-x 3 root root 4096 2008-12-16 17:43 ..
    -rw-r--r-- 1 root root 197 2008-11-18 17:07 default
    -rw-r--r-- 1 root root 30 2008-11-18 17:07 device.map
    -rw-r--r-- 1 root root 8108 2008-11-18 17:07 e2fs_stage1_5
    -rw-r--r-- 1 root root 7856 2008-11-18 17:07 fat_stage1_5
    -rw-r--r-- 1 root root 16 2008-11-18 17:07 installed-version
    -rw-r--r-- 1 root root 8712 2008-11-18 17:07 jfs_stage1_5
    -rw-r--r-- 1 root root 5103 2008-11-29 14:06 menu.lst
    -rw-r--r-- 1 root root 4621 2008-11-29 14:06 menu.lst~
    -rw-r--r-- 1 root root 7352 2008-11-18 17:07 minix_stage1_5
    -rw-r--r-- 1 root root 9756 2008-11-18 17:07 reiserfs_stage1_5
    -rw-r--r-- 1 root root 512 2008-11-18 17:07 stage1
    -rw-r--r-- 1 root root 121460 2008-11-18 17:07 stage2
    -rw-r--r-- 1 root root 9556 2008-11-18 17:07 xfs_stage1_5

    StdErr Messages

    Unknown MBR on /dev/sdb

    00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    *
    000001b0 00 00 00 00 00 00 00 00 34 e4 6c ad 00 00 00 01 |........4.l.....|
    000001c0 01 00 83 fe ff ff 3f 00 00 00 82 dd 49 17 00 00 |......?.....I...|
    000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    *
    000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
    00000200
    Last edited by airjaw; December 19th, 2008 at 09:56 PM.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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