Linux - GeneralThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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:
title Red Hat Linux (2.4.18-14)
kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/ hdd=ide-scsi
title Windows XP
map (hd0,0) (hd0,2)
map (hd0,2) (hd0,0)
title Windows XP Install CD
map (hd0,0) (hd0,2)
map (hd0,2) (hd0,0)
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.
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:
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.
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)
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.
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?
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:
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.
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:
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.
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.