Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Now I can boot any of the above operating systems by changing the BIOS boot drive. But I am trying to learn more about grub, so I want to change CentOS /boot/grub/menu.lst so that I can boot Windows without changing BIOS.
With the above entry, I am unable to boot WinXP because of "Error 13: Invalid or unsupported executable format"
Is the error due to the misuse of 'map' command? Is the map command only used for virtual swap between hd0 and hd1?
Please don't tell me to switch the order of two SATA drives because I've thought about it. It is too easy way out. I want to know more about map command. Thank you for reading my post.
It should be a one (1) not a two (2) if xp is on the second drive, example:
If you are using Grub Legacy and xp is on the second hard drive, first partition, this should boot it.
If it's on third drive in boot priority and first partition, change to:
Do you understand Yancek's point about the rootnoverify command?
In your first post you had
Quote:
rootnoverify (hd1,0)
meaning you wanted to boot to the second drive, but you said XP was the third drive.
The BIOS passes to the boot code a map of which drive is which.
You seem to be saying your BIOS passes the boot code the info that the primary PATA drive is hd0 and the primary SATA drive is hd1.
The main purpose of the map command is to modify the map that grub passes when in chains to another bootstrap.
Assuming you're right about what the BIOS gives grup in the original map, your map commands would make a new map in which hd0 is the secondary SATA and hd2 is the primary PATA. I think that is correct for your purposes.
But that doesn't change the fact that you told it to chain load to the first partition on hd1.
If your rootnoverify command was correct then your map commands were wrong. Since you say the map commands are correct, the rootnoverify command was wrong.
Also, have you verified that the bootable XP partition is the first partition of whatever drive it is on.
title Windows XP
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
chainloader +1
This one worked for me.
Although I thought I had the same entry in my menu.lst, obviously I didn't. After several changes, I decided to copy and paste what yancek had posted earlier. That did the trick.
I must have made a typographical error or errors, perhaps putting too many spaces when they are not required or spelling error(s).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.