LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual Boot Seperate HDDS Grub Problem (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boot-seperate-hdds-grub-problem-889745/)

nocturnalcalling 07-03-2011 08:38 PM

Dual Boot Seperate HDDS Grub Problem
 
I get an error 13 (Invalid or unsupported executable format) when selecting Windows XP.

I have one hard drive dedicated to Arch Linux, and the other is dedicated to XP.

This is my Grub Configuration:

GNU nano 2.2.4 File: /boot/grub/menu.lst Modified

# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst

# DEVICE NAME CONVERSIONS
#
# Linux Grub
# -------------------------
# /dev/fd0 (fd0)
# /dev/sda (hd0)
# /dev/sdb2 (hd1,1)
# /dev/sda3 (hd0,2)
#

# FRAMEBUFFER RESOLUTION SETTINGS
# +-------------------------------------------------+
# | 640x480 800x600 1024x768 1280x1024
# ----+--------------------------------------------
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795
# +-------------------------------------------------+
# for more details and different resolutions see
# http://wiki.archlinux.org/index.php/...fer_Resolution

# general configuration:
timeout 60
default 0
color light-blue/black light-cyan/blue

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*

# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/1d5d97c5-5a33-4ecf-ade7-07c0879e2f5f ro
initrd /kernel26.img

# (1) Arch Linux
title Arch Linux Fallback
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/1d5d97c5-5a33-4ecf-ade7-07c0879e2f5f ro
initrd /kernel26-fallback.img

# (2) Windows
title Windows XP Home
root (hd0,0)
rootnoverify (hd0,0)
makeactive
chainloader +1


The hard drive boot order is: First Disk= Arch, Second Disk= XP

Both systems boot correctly if I disable the drive not in use.

What would be the correct configuration?

lugoteehalt 07-03-2011 09:02 PM

Windows usually expects to be on the first partition of the first hard disk.

Having said that I bought a computer recently with some evil garbage on the first partition and Windows on the second.

Try making the Windows hard drive the first one. Probably simplest to swap the plugs over inside the box.

EDIT: But you can modify menu.lst with the map command, should think.

bigrigdriver 07-03-2011 09:12 PM

According to your grub menu.lst, you have Arch and windows installed on the same partition of the first drive:
Quote:

(0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/1d5d97c5-5a33-4ecf-ade7-07c0879e2f5f ro
initrd /kernel26.img

# (2) Windows
title Windows XP Home
root (hd0,0)
rootnoverify (hd0,0)
makeactive
chainloader +1
If windows is indeed on the second drive, change the windows stanza to read "root (hd1,0), rootnoverify (hd1,0)"
then add the following before the makeactive line:
map (hd0) (hd1)
map (hd1) (hd0)

The map lines are needed because windows wants to be on the first partition of the first drive. The map lines tell a little white lie to convince windows that it is first and windows is none the wiser.

nocturnalcalling 07-03-2011 09:41 PM

Thank you bigrigdriver. The map commands fixed the issue. I tried that earlier but I only added map (hd0) (hd1) and saved. I didn't add map (hd1) (hd0).


All times are GMT -5. The time now is 12:07 PM.