LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-17-2002, 07:41 AM   #1
Creep
LQ Newbie
 
Registered: Dec 2002
Distribution: Gentoo & Debian
Posts: 25

Rep: Reputation: 15
Dual Booting Linux & WinXP (Again, i know)


First I want to say that i have searched, but i havn't found an answer to my specific problem, so please don't complain about that, ok?

So here it goes: I've got a machine with RedHat 8.0 running. I'm using GRUB, and Linux is on my first partition. Now i want to install Windows XP on the same machine, same hdd, but on a different partition. I've done all that needs to be done, but now i want to configure GRUB so windows thinks it's on the first partition of the harddrive. I read the Linux+Windows9x+GRUB-HOWTO, and it says that to install windows xp without disturbing the current redhat-installation, i should make an entry in the boot menu that boots the WinXP install-cd. Here's my grub.conf so far:

########################

default=0
timeout=10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
root (hd0,0)
kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/ hdd=ide-scsi
initrd /boot/initrd-2.4.18-14.img
title Windows XP
map (hd0,0) (hd0,2)
map (hd0,2) (hd0,0)
rootnoverify (hd0,2)
chainloader +1
title Windows XP Install CD
map (hd0,0) (hd0,2)
map (hd0,2) (hd0,0)
chainloader (hdc)+1

########################

When i start the computer, i wait until grub loads, then i insert the cd and select the "Windows XP Install CD" from GRUBs menu. I then get an Error 28 (i think). I was wondering if it might have something to do with the "chainloader (hdc)+1" part. Should i use another device than hdc?

Also, what do you think the outcome will be? Will my RedHat-partition be disturbed in any way, and will my GRUB-loader still be there?

I really want it this way, since i've already got Linux installed on my primary partition, and i don't want to install windows and then run grub again to put it self on the mbr, cause i think windows will complain about not being on the first partition. The HOWTO said that this would work, but it only mentioned how to do it with a floppy disk, and since my floppy-drive is currently broken, i want to do the windows installation from a cd.

Thanks in advance for any help i might get. Anything will be appreciated.
 
Old 12-17-2002, 09:54 AM   #2
deadbug
Member
 
Registered: Oct 2002
Location: San Antonio, Texas
Distribution: MDK 8.0, 9.0; RH 7.2, 8.0, 9.0, FC3, FC4, FC5
Posts: 355

Rep: Reputation: 30
I have read this several times and am still not sure what you have done (have you already installed Windows XP?). Forgive me if I get a little too basic here, but there seems to be some confusion about the boot loader.

You have your choice of three boot loaders (more if you want to use a third party one)--Grub, LILO and NTLDR. The first two are with your RH distro and the third is WinXP boot loader. Your post is a mix of NTLDR and Grub procedures. All three loaders have different procedures. They all work fine, but their procedures cannot be mixed.

Conventional wisdom is to install Windows first, then Linux. Windows always overwrites the MBR (where you have put your Grub boot loader--it will be overwritten). Most distros of Windows insist on being in the first partition of the hard drive.

That said, it is possible to reverse the installation order. Also, it may be possible to leave RH in the first partition and put XP somewhere else--that one I don't know about. My only point is if you are going to go against the conventional way of doing it, make sure you have a good plan and have backed everything up.

Most advise to use the NT boot loader (NTLDR). In another post, Thymox asked why. I don't think there is a good answer. My guess is that the time they wrote their advice, Grub and LILO had problems with the NT file system and loading NT. That is no longer the case, but there is still more information out there for configuring NTLDR.

Your first best bet, is to read Red Hat's recommendations. They are here:

https://www.redhat.com/docs/manuals/...-dualboot.html

When you understand what Red Hat says, then review how to use NTLDR. If nothing else, it will teach you a little more about Grub & LILO. The best source I've seen is:

http://jaeger.morpheus.net/linux/ntldr.php

Other sites can be found with Google, by searching for: Dual Boot Linux Windows XP (or NT).

Chainloader is how Grub starts the Windows boot process since it cannot just point to a kernel as it does with Linux. I don't know if it is required with the installation CD, but, what the heck, try it without it. What is the worst that will happen? You'll get an error message and it won't start? Personally, tho, I'd just change the bios to boot from the CD.

hdc is the Master drive on your Secondary IDE channel. If that is where your CD-ROM is, that is correct. If it isn't there, you'll need to change it.

Now about the broken floppy. No floppy drive means you don't have a boot disk for RH (or, at least, a way to use one) and you will not be able to create a Windows boot disk. Bad plan--very bad plan. Throw it away and put a new one in. I don't think you will find much sympathy on this board for making things diffucult so you can save $20. You're going to need it as soon a you get that CD-ROM to boot, so get it before you install XP (before you need it).

I started off with needing a good plan. As you are developing it, post it and let the good folks here have a go at it--they'll make it even better.

Good luck
 
Old 12-17-2002, 11:09 AM   #3
Creep
LQ Newbie
 
Registered: Dec 2002
Distribution: Gentoo & Debian
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks alot for the very informative answer. I will read up on everything, and i'm not that concerned with what happens to my current configuration, since i have everything backed up on another partition. However, I'll explain it once again, filling in the parts i've missed.

In the HOWTO i mentioned, it is said that when windows wants to install everything on the first partition, grub fools it, and makes it think the secondary partition it's booted on is actually the first. The same goes for the installation cd, which gets the information that my secondary partition is the #1 partition on my system, thus not complaining about me changing it to something not adviced. I will try booting the CD without the chainloader, gonna read the documentation for grub now. (Shame on me for being lazy and asking first, i know )

What grub will do when windows starts, is to use chainloader to boot linux, as well as map the second partition as the first partition, making the system think everything is allright. So when linux is ran, the windows partition will be secondary, but once i run windows, it will think that it's the only OS on the computer.

I don't have a current installation of windows xp (got rid of that a couple of weeks ago, but now i miss my music-production stuff and the ability to watch movies without much hassle. One thing i don't miss is games, since i've got soo much spare time since getting rid of them In case i forgot anything else, i'll get that in soon. Gotta read up on some stuff now.

I see this more as an experiment, and since i use linux mostly, then why not have it on my second partition? I know it doesn't matter, but it just makes sense. And if i can get it that way, maybe that will remove some of my experience with windows taking over the entire computer.

About the diskdrive, I am such a lazyass, since i do have another drive at a friends place. I just happen to get in the mood of working with my computer just when i lose the mood of stepping outdoors and go get my stuff. (Got a second computer standing in his closet too, that used to run a Ultima Online-shard). Of course it's cheap. 20$ is too much. I could buy one for about 12$ i think.

Btw, if NTLDR actually overwrites my MBR, couldn't i just boot RedHat's installation cd and choose to upgrade, then install grub that way? How do i install grub manually if i do get a bootdisk for linux?

Thanks for helping. I think you did more good than you think. (Telling me to RTFM is one step. I gotta get into that habit)
 
Old 12-17-2002, 11:15 AM   #4
Creep
LQ Newbie
 
Registered: Dec 2002
Distribution: Gentoo & Debian
Posts: 25

Original Poster
Rep: Reputation: 15
oh, and what you said about changing the cdrom to autostart in the bios, that won't work now, since GRUB's work with tricking windows checking the partitions won't take effect then. Thus giving me problems with keeping my linux-system.
 
Old 12-17-2002, 01:30 PM   #5
Creep
LQ Newbie
 
Registered: Dec 2002
Distribution: Gentoo & Debian
Posts: 25

Original Poster
Rep: Reputation: 15
hmm... no matter what i do, i don't seem to get the cdrom-drive to launch from GRUB itself. i discovered one error though. i used hdc to boot from, that doesn't work. i edited devices.map in /boot/grub and added the virtual device hd1, that mounts /dev/hdc. now i get a different error, so my guess is that the error lies in me using chainloader to boot from the cd. what should i use instead?
 
Old 12-17-2002, 02:51 PM   #6
deadbug
Member
 
Registered: Oct 2002
Location: San Antonio, Texas
Distribution: MDK 8.0, 9.0; RH 7.2, 8.0, 9.0, FC3, FC4, FC5
Posts: 355

Rep: Reputation: 30
I just read the HOWTO you referenced. Experimentation is exactly what I would call it. That said, what I failed to point out and you didn't notice is that Grub doesn't use letters, it uses numbers. hda is hd0. If your CD-ROM is the Master device on the Secondary IDE channel--what Linux calls hdc--use hd2 in your original configuration. You do need to use chainloader to make it work. Your last line should look like:

chainloader (hd2) +1

That should do what you need

Last edited by deadbug; 12-17-2002 at 03:15 PM.
 
Old 12-17-2002, 03:58 PM   #7
Creep
LQ Newbie
 
Registered: Dec 2002
Distribution: Gentoo & Debian
Posts: 25

Original Poster
Rep: Reputation: 15
i will continue trying. thank you for your help
 
Old 12-18-2002, 01:22 AM   #8
Creep
LQ Newbie
 
Registered: Dec 2002
Distribution: Gentoo & Debian
Posts: 25

Original Poster
Rep: Reputation: 15
Nope, that didn't work. I get an Error 23, which means "23 : Error while parsing number
This error is returned if GRUB was expecting to read a number and encountered bad data."

i don't really get it. number? I added hd1 to devices.map and made it point to /dev/hdc, then i changed the grub.conf to chainload (hd1)+1, but now i get this error. if someone could point me in the right direction, i'd be happy.
 
Old 12-18-2002, 02:43 PM   #9
deadbug
Member
 
Registered: Oct 2002
Location: San Antonio, Texas
Distribution: MDK 8.0, 9.0; RH 7.2, 8.0, 9.0, FC3, FC4, FC5
Posts: 355

Rep: Reputation: 30
I'm a little confused about what you did. My recommendation was to simply change your hdc reference to hd2. What is this remapping you are talking about? Did you go up earlier in the file and create something like:

map (hdc) (hd2)

If so, Grub isn't going to understand that. Again, it doesn't use the Linux drive designations. It uses:

Primary Master: hd0 (hda in Linux)
Primary Slave: hd1 (hdb in Linux)
Secondary Master: hd2 (hdc in Linux) -- Your CD-ROM?
Secondary Slave: hd3 (hdd in Linux)

You mentioned hd1--is that a typo?

If you didn't just make the one change, please try that. Go back to what the HOWTO recommends and change fd0 in the last line (what you had changed to hdc) to hd2. If it is going to work, that will do it.

I will tell you that I still have doubts that Grub can boot from a CD-ROM.

The good news (maybe) is on another post. Someone is trying to do the same thing you are but doesn't want to use Grub to trick the system. See this website:

www.xosl.org

They claim no guaranties and I will offer these warnings:

1. This program was created in 2000 and no one is working on it now. The promise was to move it to sourceforge.net and rewrite the program. The last posting I can find there is from Jan 2001--almost two years ago. This is an experimental program that probably has a few glitches--you're on your own with them.

2. Read all of the information on the website. The XOSL advocate in the other frame appears to only have read the latest HOWTO, which makes it look easy. While it may be that easy, the link to the older version and FAQs is much more informative and has some pitfalls you want to know about.

If you don't want to use XOSL and still cannot get the CD-ROM to boot, it would appear that chainloader will not boot from a CD-ROM (the HOWTO you were looking at used a floppy, not a CD-ROM). Modern BIOS can boot from one, but most simple boot programs need to load drivers to use the CD-ROM. Think a Windows boot disk and having to load the Winchester drivers to mount the CD-ROM. There is a big difference between booting from a floppy and a CD-ROM.

My only suggestion is what I recommended earlier--go get the other floppy (or spend the $12!) and do it the way the HOWTO recommends.

Please post which option you choose and what the results are. Good luck.

Last edited by deadbug; 12-18-2002 at 03:07 PM.
 
Old 12-18-2002, 05:15 PM   #10
Creep
LQ Newbie
 
Registered: Dec 2002
Distribution: Gentoo & Debian
Posts: 25

Original Poster
Rep: Reputation: 15
Actually, GRUB has a file called devices.map, where the specifications (hd0,hd1,hd2 etc.) are given. The only two things in that file was hd0, which pointed to /dev/hda, my root. then the fd0 line. What i did was that i added a line for hd1, (hd2 in yours and the HOWTO-writers case) and pointed that to /dev/hdc. That way, i can use hd1 like the guy uses hd2. I guess i could do it that way, but since hd1 was free, it seemed logical to do it that way, and i don't think it matters.

i'm gonna look into xosl and see what i can do with that. i want to thank you really much for your help. i'm on the virge of giving up now, but i want to know that i've tried everything. Gonna get the floppydrive tomorrow, so if the cd-boot fails, i'll try it with the floppy.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems booting after trying to dual boot Linux and WinXP Matt Houston Linux - Newbie 10 10-21-2005 06:03 AM
Dual booting Mandrake & WinXP in different HDD kernel_zap Linux - Newbie 4 12-04-2004 08:16 AM
dual booting linux/winxp and order of install elhuecu Linux - Newbie 8 02-22-2004 10:10 PM
Dual booting Linux and WinXP Pro? OriginalReaper Linux - Newbie 2 01-19-2004 04:22 AM
dual booting winxp/gentoo linux c0nfig Linux - General 2 08-08-2003 04:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:59 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
Open Source Consulting | Domain Registration