LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Booting WIN XP via grub: Invalid or unsupported executable format (http://www.linuxquestions.org/questions/linux-software-2/booting-win-xp-via-grub-invalid-or-unsupported-executable-format-652407/)

5n0wCr@5h 06-29-2008 09:38 AM

Booting WIN XP via grub: Invalid or unsupported executable format
 
Hello and want to extend my appreciation in advance. I checked the other thread re: Vista but that solution and many permutations teszted are not working so I will explain my setup:

Dell Laptop E1505 with WindowsXP.

successful install of fd8 on 60BG fujitsu usb drive.

When I try to boot WindowsXP I receive the above Error 13.

#fdisk -l

/dev/sdb1 1 6 de dell util
/dev/sdb2 12 6693 7 HPFS/NTFS
/dev/sdb3 6694 8939 7 HPFS/NTFS
/dev/sdb4 8940 9545 db CPM/CTOS


/dev/sda1 1 25 83 Linux
/dev/sda2 26 7296 8e Linux LVM


Disk /dev/dm-0 57.6 GB (I believe is laptop c drive)
...
Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1 20.8 GB (laptop d: drive)
Disk /dev/dm-1 doesn't contain a valid partition table

Device.map

(hd1) /dev/sda
(hd0) /dev/sdb

#df -h
53G 2.1G 51G 4% /
/dev/sda1 190m 13m 168m 7% /boot
tmpfs 501m /dev/shm
/dev/sdb3 18G 12G 33% /media/backup
/dev/sdb2 52G 79% /media/disk


grub.conf


#boot=/dev/sdb
default=0
timeout=12
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$OY8g7UUS$.tL.ruU61EsFnH/EN4XzM.
title Fedora (2.6.25.6-27.fc8)
root (hd0,0)
kernel /vmlinuz-2.6.25.6-27.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.25.6-27.fc8.img
title Fedora (2.6.21.7-3.fc8xen)
root (hd0,0)
kernel /xen.gz-2.6.21.7-3.fc8
module /vmlinuz-2.6.21.7-3.fc8xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.21.7-3.fc8xen.img
title Fedora (2.6.21-2950.fc8xen)
root (hd0,0)
kernel /xen.gz-2.6.21-2950.fc8
module /vmlinuz-2.6.21-2950.fc8xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.21-2950.fc8xen.img
title Fedora-base (2.6.23.1-42.fc8)
root (hd0,0)
kernel /vmlinuz-2.6.23.1-42.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.23.1-42.fc8.img
#title WindowsXP
# rootnoverify (hd1,1)
# chainloader +1
title WindowsXP
# hide (hd0,0)
# rootnoverify (hd1,0)
# map (hd0) (hd1)
# map (hd1) hd0)
rootnoverify (hd0,1)
makeactive
chainloader +1

Error 13....(when trying to boot Windows only) All Linux/Xen boot fine.

I suspect the above fdisk output:

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1 doesn't contain a valid partition table

is the issue?? Need bigtime help with this one.


Note: Originally, during installation of fd8 I moved the bootloader back to the laptop HD. This worked [only] once??? ie I was able to boot WindowsXP so I reinstalled fd8 and moved boot loader back to usb but lost ability to boot XP. I would not care but have thousands of $ of software and development installed and very poor hence move to Linux.

Larry Webb 06-30-2008 05:43 AM

If you have not changed anything since fdisk -l above try to edit the bottom windows entry in your grub.conf file. Remove the entry rootnoverify (hd0,1) and see if your windows will boot.

JZL240I-U 06-30-2008 05:45 AM

Well, from your menu.lst I'd guess a simple answer: put these two lines back in
Code:

map (hd0) (hd1)
map (hd1) (hd0)

i.e. uncomment them. Last time I looked, Windows insisted to be installed on the first partition of the first disk (= /dev/sda1). In your setup linux is there...

Larry Webb 06-30-2008 05:57 AM

Thanks I missed the map lines being uncommented and the rootnoverify (hd1,0)

5n0wCr@5h 07-01-2008 05:29 PM

Put map lines back in --> Error
 
Thank you very much for your help!!!

I put the two map lines back in:

map (hd0) (hd1)
map (hd1) (hd0)

Error 11, Unrecognized device string immediately after those two lines.

I also used:

title windowsxp
rootnoverify (hd1,1)
chainloader +1

and

title windowsxp
rootnoverify (hd1,0)
chainloader +1

and


map (hd0,0) (hd0,2)
map (hd0,2) (hd0,0)
rootnoverify (hd0,2)
chainloader +1

# Unrecognized device string

and


rootnoverify (hd0,2)
chainloader +1

#Invalid or unsupportable executable format

and

rootnoverify (hd0,1)
makeactive
chainloader +1

# Invalid or unsupportable executable format

syg00 07-01-2008 05:49 PM

Try this (make sure the spaces are there for the "map" directives)
Code:

title WindowsXP
rootnoverify (hd1,1)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1


5n0wCr@5h 07-01-2008 07:40 PM

Quote:

Originally Posted by syg00 (Post 3200753)
Try this (make sure the spaces are there for the "map" directives)
Code:

title WindowsXP
rootnoverify (hd1,1)
map (hd0) (hd1)
map (hd1) hd0)
makeactive
chainloader +1


You rock syg00. Don't know what to say other than...[very] impressive. Please explain when you have a minute.

syg00 07-01-2008 08:33 PM

Windows (being brain-dead) needs to be on the first (BIOS boot) disk. I prefer to leave it that way for convenience - Linux is flexible enough to handle any setup. Some of the installers are a bit limited, but that's the fault of the particular distro devs, *not* Linux itself.
With your arrangement you need to con Windows into thinking it actually is on the first disk - hence the "map" directives; that's grub doing the "fudging" for you. The makeactive is really not needed but does no harm as Windows also expect the boot/active flag to be on.

Plenty of info on the grub site - here.

JZL240I-U 07-02-2008 01:31 AM

For any late or newcomers: the second map line misses a "(" in the second map argument, it should read
Code:

map (hd1) (hd0)
syg00 Why "rootnoverify (1,0)"? Could you comment on that, I simply don't get it why you set the LVM volume to root ... :scratch:

syg00 07-02-2008 01:48 AM

Thanks @JZL240I-U; fixed above.
Nope, that's the Windoze disk - when in doubt, trust the (working) config. If Linux successfully boots from a root(hd0,0), the other disk must be hd1. Simple.
And yes, I did see the device.map. And nope, I can't explain it any better without playing around on the box itself.

JZL240I-U 07-07-2008 03:45 AM

Quote:

Originally Posted by syg00 (Post 3201096)
...Nope, that's the Windoze disk - when in doubt, trust the (working) config...

Oops, right. My bad. Thanks for the explanation. See (read) you.


All times are GMT -5. The time now is 01:16 AM.