LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Using Grub to boot Win from 2nd harddrive (https://www.linuxquestions.org/questions/linux-software-2/using-grub-to-boot-win-from-2nd-harddrive-284115/)

Steve2001 01-30-2005 12:17 PM

Using Grub to boot Win from 2nd harddrive
 
I am trying to make my PC dual boot but have got stuck, may be some here can help me:

I have a PC running Suse 9.1 Professional. The PC has two hardrives:

First IDE channel has a 4GB hardrive (master) with Suse Linux installed and a CD as slave.

Second IDE channel has 40GB harddrive (master) with Windows 2000 Pro installed. nothing as slave on this

IDE channel.

With both hardrives connected, the machine boots up and displaye the GRUB memu if SuSe is chosen all is

fine and Suse starts, however, if I choose Win 2000 from the Grub menu I get this errror:

Error 13 Invalid or unsupported executable format.

the grub script for the Win 2000 menu choice is:

title Win 2000
map(hd0,0)(hd1,0)
map(hd1,0)(hd0,0)
rootnoverify (hd1,0)
chainloader +1


Thinking it was an error in the Win installation I have tried turning off the PC, disconnecting the

ribbon cable from the Linux drive and then re-booting and in this case the PC boots in to Win 2000.
So I am convinced that the installation of Win 2000 on the second hard drive is correct but that the

Grub script is not correct.

What should the correct grub commands be to boot into Win 2000 on the second drive?

Steve2001 01-30-2005 01:06 PM

Fixed!


After the error I played arround with some commands line instructions to Grub and eventually got it to boot.

My Win 2000 Grub script is now:



map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1)+1
boot


This seems OK, although I'm not sure why the boot is needed as what I have says that Grub should automatically add this when executing boot menu selections.

Juerg 02-05-2005 10:33 PM

Hi

I got something similar, it help to follow the advise of SUSE to change the IDE-HD from AUTO-detection to LBA. It boots smooth now.

Regards
Juerg

Nechos 02-06-2005 10:58 PM

I had the similar problem some time ago, and tried/learned "all" the grub options and command line combinations without success...I'm pretty sure I screwed up winxp boot before that :mad: (so I had no chance of repairing it). Anyway, I'm pretty sure you can do without the two "map...." lines, because what 'map' does is shange the order or naming of harddisks/partitions (hd0 means hda, hd1 hdb, second number is number of partition on that hd)...The 2nd map line practically switches back o original (default) partition order :)

Could you tell me where did you put your bootloader (grub)? MBR, / or /boot?

Juerg 02-06-2005 11:41 PM

I have a system with (Celeron 1.7, 750Mb)

HD C, 1st partition:
Win98 (20Gb)

HD C 2nd partition:

Linux SUSE 9.1 (20Gb)

HD D: 1 partition

Win XP (80 Gb)

After the installation of SUSE I applied the patch, to no avail, it kept telling me

hd(0,0)
Chainloader +1

SUSE says that somehow GRUB can not autodetect this LBA and it fails loading. Since I'm a newbie I didn't understand it well but changed (HD C) from AUTO to LBA, and it works as before.

Juerg

syg00 02-06-2005 11:56 PM

Quote:

Originally posted by Steve2001
This seems OK, although I'm not sure why the boot is needed as what I have says that Grub should automatically add this when executing boot menu selections.
The boot should be unnecessary if using the grun.conf
Manually entering the commands requires the boot command to initiate.

Both map commands *are* required - they are directives to grub, and refer to separate (physical) entites.
Seen a couple of these posts with "bad" mappings recently - so much for automation.


All times are GMT -5. The time now is 06:16 PM.