LinuxQuestions.org
Visit Jeremy's Blog.
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 11-01-2004, 11:30 AM   #1
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Rep: Reputation: 15
Configure GRUB for Windows and Linux


Can anyone tell me how to configure GRUB for dual boot?

I have installed Windows on the MBR, and just installed RHEL3. However, when the GRUN configuration came up, it did not see the Windows partition (on a separate disk - HDA - Primary Master disk).

Can anyone enlighten me on how to do this after the fact?

Thanks!

Robin.
 
Old 11-01-2004, 07:46 PM   #2
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
firstly does your bios boot order drive2 then drive 1? So its mbr 2 that loads?

2) is drive 2 (linux) a IDE or sata (scsi) ?

2) http://www.linuxquestions.org/questi...troubleshooter gives examples of windows

try adding this to your menu file if the above questions = answers are bios boots mbr2 which is on a IDE drive
title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1
boot
 
Old 11-01-2004, 08:49 PM   #3
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
Hi!

In answer to your questions:

1. When GRUB was loaded as part of the the RHEL initial install, it asked if I wanted to put GRUB on the MBR - HDA I believe - I said yes.

2. I read your How TO, and now have the exact entry you mention for Windows XP, but still get the error message.

Here is a little more detail:

- When I partitioned the drives initially, I left HDA as free space - I found that because the disk was not partitioned, GRUB couldn't see it, so I couldn't add HDA as a bootable option. So, I did an FDISK to create a partition (but NOT format) as extended ext3, and then added your code to the menu.lst in /boot/grub. I still get the number cannot be parsed error...

So I am now really confused!

Any help is very much appreciated!

Thanks,

Robin.
 
Old 11-01-2004, 08:49 PM   #4
jojotx0
Member
 
Registered: Mar 2004
Distribution: Debian Lenny
Posts: 181

Rep: Reputation: 30
here are step-by-step instructions on how I dual boot:

1.boot off windows CD and get to DOS (NOTE: you must be able to get to a DOS prompt for this dual boot to work)
2. Run FDISK while in the DOS prompt
3. setup 2 partitions one for the windows install and another one for linux install
4. format both partitions.
5. install windows too first partition.
6. boot off linux CD
7. setup linux to install on the second partition
8. make sure that the boot loader is setup to see linux and windows
9. install linux
10. boot the computer with no media disks e.g. CD-ROM's, floppy disks.

with luck that you set everything up correctly GRUB boot loader should come up with 2 selections..possibly 3, 2 for linux and 1 for windows...I don't know why linux has 2 selections...but that's the way it is when I installed FC1.
 
Old 11-01-2004, 08:56 PM   #5
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
oops - all drives are IDE:

HDA1 = Windows XP (80GB)
HDB1 = RHEL - /BOOT (2048MB)
HDB2 = RHEL - SWAP (4096MB)
HDB3 = RHEL - /DATA Remainder of 200GB Drive
HDC = CD/DVD R/W
HDD = RHEL - /DATA2 All of 200GB Drive

And, unless the BIOS was changed by the Linux install, I believe it is booting from HDA (Primary Master).

Thanks,

Robin.
 
Old 11-02-2004, 05:49 AM   #6
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
darn it, I have just seen you mention FC2 and thats got a bug with dual boot as it mucks up the partition table windows sees.
the fixes are mentioned in my error section.

2) you appear to be saying bios boots to windows drive hda and you decided to fdisk hda, no no no.
grub can be in the mbr of any drive and boot linux on the other drive.

its the windows that grub can't boot direct and windows likes to be first drive first partition so grub has to chainload to the windows bootloader

3) if hda was partitioned and not formatted you can NOT have a operating system on it.

4) since you have partitioned it I agree with jojotx0.....install windows on drive 1 it will put windows bootloader back into drive 1.
then install linux to drive 2 but do not use any RH or FC2 unless you know you have cds with no partition bugs.
then install grub to floppy first to test it can boot windows and when happy put grub into mbr of drive1.

5) you can leave space on hda, linux does not care. Grub does not care, its will chainload so makes no comment on the size of your partitions etc.

6) add a entry to your linux /etc/fstab to mount your data drive something like
/dev/hdd1 /data reiserfs defaults 1 3
 
Old 11-02-2004, 09:28 AM   #7
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
Here is th process I went through:

1. Configured the PC with the drives as mentiuoned above:

Primary Master = 80GB
Primary Slave = 200GB
Secondary Master = DVD/CD R/W
Secondary Slave = 200GB

2. Booted from Windows XP disk and installed XP Pro on the Primary Master - everything worked fine in Windows

3. Booted from the RH Enterprise and installed on the Primary Slave. When I used Disk Druid, the primary master (HDA) showed only as free space

4. When GRUB came up, I could not set up HDA as a boot option, as it did not see the drive, so I could not add Windows as a boot option

5. After RH Enterprose was installed, I FDISK'd HDA to be EXT3 as an extended partition (but I did not format, as it was already formatted with Windows installed).

6. I added the Windows XP boot item to menu.lst and re-booted

7. When I tried to boot to Windows, I received the error parsing number 23, press any key, and I could only boot to Linux.

Am I better off starting over, or can I fix this?

Also, I am not using FC2...

Thanks,

Robin.

Last edited by rwalkerphl; 11-02-2004 at 09:45 AM.
 
Old 11-02-2004, 07:48 PM   #8
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
FC2 is a part of your signature did you install it after windows, as it buggers up the partition table windows sees and that may still be your problem

I was not blunt enough, sob,
if you only want windows on hda, if I am reading you correctly please please do not go trying fdisk or any other partitioning tool on windows and the purpose of a partition tool is to resize or add delete partitions and at NO time did you indicate that intention.

I can only go on my aussie english so if spare space on hda is to be used SAY so ok?

2) so your 1 & 2 is good and you should have stopped at your (3)

3) remember me asking what kind of drives you have ....answer is????

4) you can not continue with grub or lilo until you sort out this disk druid....I don't use it but it sounds like a partitioning tool? and I repeat why are you trying to partition your hda for windows tell us what you what with the spare space of hda or just leave it

(darn it I am getting grumpy again) heh heh.

5) can you post your grub menu (conf) file if you are still talking to me and exactly how you used grub. I am interested if you used grub in a terminal with su access or you tried grub-install .....as I found the latter way is bad so I don't have it in my tutorial.

6) independently you could look at your drives with a knoppix cd
 
Old 11-02-2004, 07:52 PM   #9
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
ahhh my fading brain cells for mandrake recalls disk druid for that distro wanted space to put mandrake so maybe thats what the issue is but that still means
don't touch hda with disk druid.
 
Old 11-02-2004, 08:07 PM   #10
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
OK, now, you are an aussie talking to a pommie who lives in the US, so you know what I say is what I mean!

Lets get a few things straight:

1. All disks are IDE

2. I used FDISK from Linux NOT Windows

3. If I didn't FDISK in Linux, GRUB did not see a partition to boot from. Otherwise as far as linux knows, there is a disk with free space.

4. Disk Druid is a GUI installation version of FDISK in the Red Hat Distro

5. HDA is a separate Windows disk and is formatted with Windows already installed

6. I am NOT using FC2 (not on this machine anyway...) - I have 3 servers - 2 running RH Enterprise, the third running FC2. The server I am dual booting is Enterprise....

7. Here are the entries in the menu.lst - I updated doing su then vi menu.lst:

# 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 (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd1,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdb1
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
title Red Hat Enterprise Linux ES (2.4.21-20.ELsmp)
root (hd1,0)
kernel /boot/vmlinuz-2.4.21-20.ELsmp ro root=LABEL=/1 hdc=ide-scsi
initrd /boot/initrd-2.4.21-20.ELsmp.img
title Red Hat Enterprise Linux ES-up (2.4.21-20.EL)
root (hd1,0)
kernel /boot/vmlinuz-2.4.21-20.EL ro root=LABEL=/1 hdc=ide-scsi
initrd /boot/initrd-2.4.21-20.EL.img
title Windows XP
hide (HD1,0)
unhide(HD0,0)
rootnoverify (HD0,0)
makeactive
chainloader+1
boot

8. Why did Merv the Swerve have such a stupid moustache? And come to think of it, why did Shane Warne have a bleached 80's perm in the 90's?! And yes, I know Shane Warne is a kick ass bowler!

Regards,

Robin

Last edited by rwalkerphl; 11-02-2004 at 10:23 PM.
 
Old 11-03-2004, 03:21 AM   #11
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
I luv it when you talk honestly, heh heh. PT= partition tool

I am telling you that you may NOT proceed to grub by running fdisk or disk druid on hda.

We seem to not understand why not so I will be even more verbose.

1) I start linux cds to install linux. Either I have used an independent partition and formatter from knoppix cd or resccd or toms floppy OR I use the partition tool from my install cds.
And I partition and format my linux stuff with my linux PT.
2) unless I want to use the spare space on hda I DO NOT let disk druid or any other PT touch hda.
3) I am saying there is something WRONG for you to continue if grub wants more partitions on hda. I say grub should not care.

4) I see typos in your windows menu item.

title Windows XP
hide (HD1,0).......make hide (hd1,0) and can delete in most cases
unhide(HD0,0).....make unhide (hd0,0) Mind the gap.....and can delete in most cases
rootnoverify (HD0,0).....change to (hd0,0)
makeactive
chainloader+1....add gap of one space after the R
boot

5) I had hide and unhide in my tutorial to be more paranoid but I take pity on poms.heh heh

6) Where is your / partition now I look I see /boot swap data and data2? I am guessing your /boot is a sub-folder to / which is the true partition on hdb1?
 
Old 11-07-2004, 06:01 PM   #12
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
The problem is solved! I went back and had to delete the partitions on the master drive. The only way I cold do this in thte end was to remove it and attach it to another PC and use the disk managent facility.

Once I did that, I re-installed Windows first, then RHEL3, and GRUB worked like a snap! It recognised the NTFS partition on hda, and even created the boot entry in the menu.lst file!

So, I am almost happy! The only issue I have now is with memory conflicts in Windows, so everyon cen mail me and tell me to can Windows and go solely to Linux!

Thanks!

Robin.
 
Old 11-07-2004, 09:18 PM   #13
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
rwalkerphl

well done. b4 you can windows go into LQ control panel and remove FC2 or amend it to "was FC2 now RH etc" to stop confusing us simple aussies.

I don't care if you stay with windows, in a democracy you are entitled to be wrong. heh heh
 
Old 11-07-2004, 11:15 PM   #14
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
OK, I have 3 servers running, 2 have RHEL, the 3rd has FC2, so my bio is correct...

Unfortunately, I am using Cakewalk Home Studio for recording, and it is only supported for Windows, so I'm stuck with it until they go with Linux...

Last edited by rwalkerphl; 11-07-2004 at 11:17 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
Help Windows and Linux (GRUB) vaneeri Red Hat 4 10-08-2004 01:56 AM
Grub, Windows 2k and Linux kaner Linux - Software 8 08-31-2003 02:47 PM
Installed Windows and Linux, but can't configure Dual Boot albert106 Linux - Newbie 19 07-31-2003 12:10 AM
Boot windows 98,windows XP and linux by GRUB Swift&Smart Linux - General 6 02-22-2003 09:11 AM
How to configure Windows XP to work with Linux routing? Shark Linux - Networking 1 11-03-2002 03:37 AM


All times are GMT -5. The time now is 07:10 AM.

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