LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-21-2006, 09:00 AM   #1
Tom "Techno" Earl
Member
 
Registered: Sep 2006
Posts: 37

Rep: Reputation: 16
Unhappy 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
 
Old 09-21-2006, 10:00 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
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
 
Old 09-22-2006, 02:21 AM   #3
Tom "Techno" Earl
Member
 
Registered: Sep 2006
Posts: 37

Original Poster
Rep: Reputation: 16
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
 
Old 09-22-2006, 02:27 AM   #4
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 09-22-2006, 06:50 AM   #5
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
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
        map (hd0) (hd1)
        map (hd1) (hd0)
        rootnoverify (hd0,0)
        chainloader +1

Last edited by Lenard; 09-22-2006 at 06:52 AM.
 
Old 09-22-2006, 04:31 PM   #6
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 09-23-2006, 12:29 AM   #7
Tom "Techno" Earl
Member
 
Registered: Sep 2006
Posts: 37

Original Poster
Rep: Reputation: 16
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
 
Old 09-23-2006, 06:29 AM   #8
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
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
        rootnoverify (hd0,0)
        chainloader +1
 
Old 09-23-2006, 02:47 PM   #9
Tom "Techno" Earl
Member
 
Registered: Sep 2006
Posts: 37

Original Poster
Rep: Reputation: 16
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

Last edited by Tom "Techno" Earl; 09-23-2006 at 02:53 PM.
 
Old 09-23-2006, 04:26 PM   #10
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I think it is
Code:
title WindowsXP
        root (hd1,0)
        chainloader +1
        map (hd1) (hd0)
        map (hd0) (hd)
When I first did a dual boot with two drives, it never used chainloader.

I got the above from http://gentoo-wiki.com/HOWTO_Dual_Bo...NTLDR)_and_why, but this link may not work in all browsers.
 
Old 09-24-2006, 09:48 AM   #11
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
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

Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         261     2096451   16  Hidden FAT16
/dev/hda2   *         262        6258    48170902+   c  W95 FAT32 (LBA)
/dev/hda3            6259        6271      104422+  83  Linux
/dev/hda4            6272       12161    47311425    5  Extended
/dev/hda5            6272        8882    20972826   83  Linux
/dev/hda6            8883       10447    12570831   83  Linux
/dev/hda7           10448       10708     2096451   82  Linux swap / Solaris
/dev/hda8           10709       12161    11671191   83  Linux
So the Windows entry in my /boot/grub/grub.conf file looks like;
Code:
title Windows XP
        rootnoverify (hd0,1)
        chainloader +1
 
Old 09-24-2006, 07:55 PM   #12
louieb
Member
 
Registered: Jun 2006
Location: Texas
Distribution: Ubuntu 8.04
Posts: 94

Rep: Reputation: 17
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
                map (hd0) (hd1)
                map (hd1) (hd0)
                rootnoverify (hd1,0)
                chainloader +1
                makeactive
                boot
 
Old 09-25-2006, 05:11 AM   #13
Tom "Techno" Earl
Member
 
Registered: Sep 2006
Posts: 37

Original Poster
Rep: Reputation: 16
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 !!

Thanks
 
Old 09-25-2006, 10:56 AM   #14
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
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...
 
Old 09-26-2006, 03:27 AM   #15
Tom "Techno" Earl
Member
 
Registered: Sep 2006
Posts: 37

Original Poster
Rep: Reputation: 16
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
grub question changing boot order making windows boot first nfsutim Linux - Newbie 29 10-27-2012 12:53 PM
Getting 64-bit GRUB to boot Windows XP on a second HD? Tom "Techno" Earl Linux - Newbie 1 09-21-2006 12:42 PM
dual boot - Grub won't boot Windows on /windows/D partition biosol Suse/Novell 9 04-09-2006 08:14 PM
GRUB dual boot problem: Boot "other" (windows) just restarts GRUB! stevod333 Linux - Software 13 04-06-2006 05:26 AM
Need help with 64bit Fedora/ 32 bit Windows Dual Boot Sliceman Fedora - Installation 0 05-20-2004 04:18 PM


All times are GMT -5. The time now is 03:34 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration