LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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-03-2004, 02:11 PM   #1
steve-lin
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Rep: Reputation: 0
Unhappy Grub Config / MBR Problems!!


Hi,

I have just recently installed Fedora Core 2.
I have two Hard Drives in my machine,
1st Hard Drive hosts Windows XP (on first Partition, second partition for data only)
2nd Hard Drive hosts Linux Fedora Core 2 (on first Partition)

I have Linux booting fine, thanks to Grub. However, I am now unable to boot to my Windows OS.

Can someone please write out the exact info that should be placed into Grub.conf for me to be able to boot to both Linux and Windows XP.
I have looked on some forums and attempted re coding but when I try and boot - I cannot boot to Windows XP.

It would be great if someone could write out the exact code for me that will make it work, and be able to boot to both partitions/OSs.


Thanks for any help,


Steve
 
Old 09-03-2004, 03:13 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
where is Grub installed?
 
Old 09-03-2004, 03:54 PM   #3
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
post the content of
cat /boot/grub/grub.conf
 
Old 09-03-2004, 06:08 PM   #4
kostason
Member
 
Registered: Aug 2004
Location: Greece
Distribution: Fedora Core 2, DeLi Linux 0.6.1, Slackware 10.0
Posts: 105

Rep: Reputation: 15
hi
Try to add the following at the file
/boot/grub/grub.conf

Quote:
title Win XP
rootnoverify (hd0,0)
map (hd0) )hd1)
map (hd1) (hd0)
chainloader +1
note: you have to be root to do the above

then in your grub menu you will have an option to boot at Win XP.

I hope I was of some help

------------------------
Kostason
 
Old 09-05-2004, 07:10 AM   #5
steve-lin
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Red face Reply: MBR Problems (Steve)

Hi,

Thanks for your help fellers,

I tried the code sugested - got an error when trying to boot : error 11 invalid drive string

Here is the a copy of grub.conf

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/hdb2
# initrd /initrd-version.img
#boot=/dev/hda



default=1
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Fedora Core (2.6.5-1.358)
root (hd1,0)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.358.img

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


Thanks again, I hope you can suggest something from this!

Steve
 
Old 09-05-2004, 08:49 AM   #6
methuselah
LQ Newbie
 
Registered: Oct 2003
Location: Drouin, Australia
Distribution: Ubuntu 9:10
Posts: 19

Rep: Reputation: 0
Hi,

I thin k your problem is in re-mapping the drives. XP is on the primary IDE from the look of your post.

Try the following at the grub prompt (grub>)

title Win XP
rootnoverify (hd0,0)
makeactive
chainloader +1
boot

If the computer boots o.k. edit /boot/grub.conf (log on as root to do this)

Good luck
 
Old 09-05-2004, 11:03 AM   #7
kostason
Member
 
Registered: Aug 2004
Location: Greece
Distribution: Fedora Core 2, DeLi Linux 0.6.1, Slackware 10.0
Posts: 105

Rep: Reputation: 15
steve-lin
sorry, my mistake.
check the parenthesis on line 3 of the Win XP block and correct it as follow
Quote:
title Win XP
rootnoverify (hd0,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
the error #11 is
11 : Unrecognized device string
This error is returned if a device string was expected, and the
string encountered didn't fit the syntax/rules listed in the *Note
 
Old 09-05-2004, 01:48 PM   #8
steve-lin
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Reply (steve)

Kostason:

On your second post, I cannot see any difference in the code you suggested from your first post:

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

??

Methuselah:

XP is on my primary Hard Drive (on first partition) you are correct.
I have tried your suggested code - I just got all the code on screen as text and nothing happened at all.


This is just turning into a nightmare, I fear I have ruined my Master Boot Record and will never be able to boot XP again without wiping the MBR and reinstalling Windows!! If anyone is able to provide me with some code to avoid this I will be eternally greatful!

Thanks for your continued help guys!

Steve
I await further suggestions?
 
Old 09-05-2004, 06:09 PM   #9
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
Use

fdisk -l

to have a look at the partitions on the disk

in my case I get

/dev/hda1 1 5 40131 de Dell Utility
/dev/hda2 6 1548 12394147+ 7 HPFS/NTFS
/dev/hda3 1549 2559 8120857+ f Win95 Ext'd (LBA)
/dev/hda4 * 2560 4864 18514912+ 83 Linux


and my /boot/grub/grub.conf is
title Windows XP
rootnoverify (hd0,1)
chainloader +1

where /dev/hda2 = (hd0,1)
 
Old 09-05-2004, 11:14 PM   #10
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
It's probably the Fedora dualboot bug, go into bios and change the harddisk access mode from "Auto" to "LBA"
If for some reason you cant change it in bios, boot with the Fedora cd into rescue mode and enter the following command:
Code:
sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda
and don't bother with the "map (hd0) (hd1)" etc lines in grub.conf, it won't help.

Last edited by Demonbane; 09-05-2004 at 11:15 PM.
 
  


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 MBR overwritten by WIN98 MBR TOuseef Linux - General 7 11-14-2004 05:25 PM
problems with grub config or fstab? orionpc84 Linux - Newbie 3 09-11-2004 03:55 PM
Installation Questions: GRUB / LILO / RAID Config & MBR Zaphod98 Linux - General 1 09-09-2004 01:32 PM
lilo.config mbr ???? nOOb1kanobee Slackware 5 03-01-2004 10:56 AM
problems with formatting second disc after removing grub from mbr aabeeikora Linux - Newbie 2 08-02-2003 03:05 PM


All times are GMT -5. The time now is 02:52 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration