Getting 64-bit GRUB to boot Windows XP on a second HD?
Hi all,
I'm new here, so first I'll start with an intro. I'm running Linux Fedora Core 5 x86_64 on an AMD athlon 64 3200+ board. Which leads me to my first question!! I would very much like to run Windows XP SP2 32-bit as a secondary OS. I have Fedora Core 5 64-bit on a SATA drive so that it will boot. I have Windows XP on an IDE drive set as master. As it is, Linux will boot, but the GRUB Bootloader doesn't see windows as being there. Without reinstalling either of the systems, how would I get it to Dual boot? Is there some scripting I can add to the GRUB, or is it more sinister, lol?! Thanks Tom "Techno" Earl |
First show us the output from the typed commands;
/sbin/fdisk -l (that is the lower case letter 'L' in the command) cat /etc/grub.conf cat /boot/grub/device.map |
Hi thanks for the reply!!
The first command /sbin/fdisk -l (that is the lower case letter 'L' in the command) doesn't produce anything the second command cat /etc/grub.conf produces: cat: /etc/grub.conf: Permission denied the last command: cat /boot/grub/device.map produces: (hd0) /dev/sda hope that helps! Thanks:newbie: |
You need to use the map command in Grub to remap each drive in order to boot up Windows. It is confusing. I suggest searching for examples. I suggest ignoring device.map step that Lenard have given to you. The device.map is not the cause.
|
The permission denied error from the command 'cat /etc/grub.conf' is because (my mistake) you need to be root for this command to work. The first command '/sbin/fdisk -l' should have worked also and produced as in the output the hard drive(s) partitioning information, example;
/sbin/fdisk -l Disk /dev/hda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 7395 59400306 7 HPFS/NTFS /dev/hda2 7396 14593 57817935 f W95 Ext'd (LBA) /dev/hda5 7396 14593 57817903+ b W95 FAT32 Disk /dev/hdb: 40.0 GB, 40037760000 bytes 16 heads, 63 sectors/track, 77578 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Device Boot Start End Blocks Id System /dev/hdb1 * 1 203 102280+ 83 Linux /dev/hdb2 204 44288 22218840 83 Linux /dev/hdb3 44289 75496 15728832 83 Linux /dev/hdb4 75497 77578 1049328 5 Extended /dev/hdb5 75497 77576 1048288+ 82 Linux swap / Solaris It looks like you may have added the IDE Windows drive to the system after Linux (FC5) was installed, since the Windows drive is not listed in the /boot/grub/device.map file, why I asked to see the device.map file. Electro is correct, one needs to use the map command inside the grub.conf file so Windows can boot. But grub needs to know which drive is which for the map command to work, only the SATA Linux drive (/dev/sda) is currently listed (known). This can be fixed by booting into Fedora Core and as root from the console or xterm session type something like; /sbin/grub-install --recheck /dev/sda Hopefully the results will now show in the /boot/grub/device.map the two drives, for example; (hd0) /dev/sda (hd1) /dev/hda Here's an example entry to boot into Windows from grub, this may be added at the end of the /boot/grub/grub.conf file. When the grub splash screen is displayed press any key then select the Windows XP (as per the example entry) boot choice. The primary Windows partition [the rootnoverify (hd0,0) line] after the remapping of the drives may or may not be correct, this depends on the partitioning of the added Windows IDE drive, which is why the output from the 'fdisk -l' command was requested. Code:
title Windows XP |
Again do not mess around with device.map unless you know what you are doing. My device.map has neither my primary hard drive (hda) and secondary hard drive (hde). Though device.map could be used to name /dev/hda as windows instead of hd0.
I recommend running grub and type root (<tab> will provide you with a list of drives you can use. |
Hey Electro and Lenard.
Thanks for the advice, I've run: /sbin/grub-install --recheck /dev/sda and the output was: (fd0) /dev/fd0 (hd0) /dev/hda (hd1) /dev/sda I'm gonna try the grub scripting next!! Thanks for all the quick replies, linux can be a confusing place when starting a new task, but with any luck, you've both helped me through Thanks |
It seems the layout of the hard drives has changed. The Linux drive changed from hd0 to hd1, you need to take this into account when checking/editing the /etc/grub/grub.conf file. The example I provided may not need to have the remapping of the drives also.
Code:
title Windows XP |
Hey,
thanks for the hasty replies!! Right I've added the grub.conf scripting, both the revised and the original. the revised comes up with: Error 13: Invalid or unsupported format when I try to boot windows. the first one also said Error 13, but slightly different, I can't remember how! I have tried replacing rootnoverify (hd0,0) with rootnoverify (hd1,1) and now it comes up with: Error 22: No such partition Hope that helps Tom |
I think it is
Code:
title WindowsXP I got the above from http://gentoo-wiki.com/HOWTO_Dual_Bo...NTLDR)_and_why, but this link may not work in all browsers. |
So which partition is the Windows boot partition on the second hard drive???
Sometimes it is not the first partition, for example the Windows partition is actually the second partition on my laptop, the first is hidden from Microsoft; Code:
$ /sbin/fdisk -l Code:
title Windows XP |
I have win xp on my second drive and Ubuntu on the first. This is what my entry for win xp looks like. It works for me.
Code:
title Win XP Home |
Hi Louieb,
thanks for all of your help I've now resolved the problem, louieb, your suggestion worked!!;) Brilliant. Thanks for helping me Electro and Lenard:cool: !! Thanks |
Glad you resolved your problem but I have a question.....
When you installed Linux did it not prompt you for the GRUB dual boot loader? Correct me if I am wrong but that is the easiest step in installing the Fedora Core 5 on a Dual boot system. If you have Windows on the master drive and are installing FC5 on another partition or secondary drive it will prompt you for GRUB to be installed.... did this not happen? How did you isntall FC5? Even if you had it reversed... FC5 becomes the choice of boot because GRUB selects it by default.... at least from my knowledge... |
Hi bskrakes,
the situation was: I already had FC5 installed on the computer, I then got another hard drive to put in with XP on it. As you can probably understand, I didn't want to reinstall FC5 and have to set it all up again. I put the XP hard drive into my linux box, and wanted to just alter GRUB, so that I could dual boot! Hope that clears it up! Thanks once again to all who helped!! Tom "Techno" Earl |
All times are GMT -5. The time now is 11:53 PM. |