# Red Hat Linux 9 and Win XP dual boot, no GRUB upon boot?



## VKellyV (Aug 11, 2003)

I have done a large amount of reading and finally tried to install Red Hat Linux 9 so I could dual boot it with my already installed Windows XP pro OS.

I started by using Partition Magic 7 to open up some free unallocated space (previously under my windows partition) at the end of my hard drive.

I rebooted from rh 9 cd 1 and went through the steps to install the OS. I chose the GRUB boot loader and requested that it be placed on the first sector of the boot partition (since I have read in numerous places that problems can occur when placing it on the MBR).

I rebooted and no GRUB boot loader showed up, it just started up windows.

So I tried rebooting by using the linux boot diskette I created during the installation. The first time I tried installing, it simply stated BOOT FAILED. The second time I installed it, it would print some intro lines (not anything that gave me an indication it was starting, just like introductory material), and then gave the BOOT FAILED message again.

The diskette doesn't work and I don't get an option to choose win xp or linux when I start, so cannot start linux even though the installation seemed to work fine.

I could maybe create a new diskettee by running linux rescue mode under the cd but don't know the specific commands needed to do this, could anyone give me a step-by-step to do this?

Also, I have a feeling that maybe the boot loader doesn't work because my computer must still follow the 1024 cylinder boundary rule for the /boot partition. All the partitions are at the end of the hard drive after my win xp partition. Everyone says that newer computers don't have this restriction but I can't find a listing anywhere of what they mean by "newer." My computer is a 2001 and has a Maxtor 5T040H4, Ultra ATA, Hard Drive. I got this idea since I read somewhere that the ATA doesn't have the capability of booting beyond the 1024 cylinder boundary but the ATA2 does.

Can anyone tell me if this is the case if you've had a similar problem? I might have to try to put the /boot partition before the 1024 cylinder boundary but am worried about what it will do to windows when I try to move that partition over to make room for the /boot partition. If anyone has done this, could you give me a step-by-step of what you did (if using Partition Magic)?

Also, I was thinking maybe the problem is I need a way for the MBR to link to the GRUB boot loader in the linux boot partition. I found an article about this here,

http://www.geocities.com/epark/linux/grub-w2k-HOWTO.html

but am having trouble when I get to the part about mounting the floppy drive in order to copy linux.bin there. First, it says /mnt/floppy does not exist and so I made a directory called floppy there and then mounted and it said it was not a disk or something like that, can't remember exact wording. Can anyone explain step-by-step how I can copy the linux.bin file to a floppy from the linux rescue mode?

Thanks,
Kelly

Dell Dimension 8100
40 GB
1.7 GHz
256 MB RAM
32 MB NVIDIA GeForce 2 GTS/GeForce 2 Pro
Turtle Beach Santa Cruz Sound Card


----------



## lynch (Aug 3, 2002)

Try  this.
HTH
lynch


----------



## VKellyV (Aug 11, 2003)

Thanks, I fixed the problem last night and was going to post the following but the page wasn't loading. I did something very similar to what that link says.....

Ok, I finally got this windows xp and red hat linux 9 dual boot on one hard drive to work!! I figure I should post everything I did in case anyone else has the same problem:

Windows XP pro was already installed on my computer (FAT32 file system). I used Partition Magic 7 to created unallocated space out of unused space in the windows partition (at the end of the hard drive).

I rebooted with the Red Hat installation cd 1. I went through installing everything, using automatic partitioning of the unallocated space (but reviewing the partitions it created). I chose Grub as my boot loader but placed it on the first sector of the boot partition (/boot). I put it here rather than on the MBR because I read how people ran into trouble a lot of times (especially with being able to boot windows) when they did this.

After the installation, I rebooted and then I was not given any option to start linux, windows just started automatically like always. So now I basically followed the instructions in this article:

http://www.geocities.com/epark/linux/grub-w2k-HOWTO.html

I put cd 1 back into the drive and rebooted. At the boot: prompt, I typed linux rescue. I then changed to the root by typing chroot /mnt/sysimage. Here I found out which was my /boot partition by using the df command. In my case, my boot partition was /dev/hda2. So then I typed grub-install /dev/hda2. I displayed my /etc/grub.conf file by using the cat command and verified that it had an entry for windows (it called it dos).

Next, I copied the linux.bin file to a floppy by doing the following. My /dev/fd0 device was not listed in my /etc/fstab file, but I was still able to mount it by creating a directory called floppy in the mnt directory. After creating the directory, I made sure I had a floppy in my a: drive (as it is called in windows) and typed mount t msdos /dev/fd0 /mnt/floppy. After mounting, I typed dd if=/dev/hda2 of=/mnt/floppy/linux.bin bs=512 count=1. This copied the file to the floppy. I then exited and rebooted into windows.

I copied linux.bin from the floppy into the c:\ directory. Then I opened the boot.ini file in notepad by going to Start->Run and entering notepad C:\boot.ini. I then added the line c:\linux.bin=Linux to the end of the file and saved it.

I was able to alter the file but it is possible that someone elses file may be set as read-only. You cant even see the file in My Computer because it is hidden. To make it visible and uncheck read-only so you can alter the file, you can go to Tools on the menu->Folder Options->View and then select Show hidden files and folders and deselect Hide protected operating system files (Recommended). After this, you should be able to see the boot file. You can then right-click it and select Properties. In the dialog box, unselect read-only so you can alter the file. After you alter the file by adding that line to the end, save it, and change all the settings back to how they were (i.e. recheck read-only, etc).

After this, I rebooted. A text window came up and gave me the option of booting into windows xp professional or linux. If I chose windows xp, xp started like it usually does. If I chose linux, then I got another window asking me to chose linux or dos. If I chose linux, then linux started up. Because it was my first time starting it, I had to go through a little set-up tutorial and on the final box before linux started, I got this error:

Could not look up internet address for x1-6-00-5b-1b-99-60. This will prevent GNOME from operating correctly. It may be possible to correct the problem by adding x1-6-00-5b-1b-99-60 to the file /etc/hosts.

I said log in anyway and everything seemed ok. This is the last question I have about my setup. What should I do here? How do I add whatever that is to /etc/hosts?

Otherwise, I am very happy with this setup because if I ever wanted to make my computer windows only again upon booting, I just have to alter the boot.ini file and it will start up just in windows as if linux wasnt even on my hard drive.

Kelly

Dell Dimension 8100
40 GB
1.7 GHz
256 MB RAM
32 MB NVIDIA GeForce 2 GTS/GeForce 2 Pro
Turtle Beach Santa Cruz Sound Card


----------



## occum (Aug 9, 2003)

I am new to linux and running approx. the same system... I had problems but I found grub worked great as long as it was not in the boot sector. It can be placed anywhere on the drive as far as I know.


----------



## eboshart (Sep 5, 2003)

Hi peoples,

I did all the above mentioned tasks for the dual booting of XP and RH9. My setup is identical here. Where I installed XP first to a partitioned disk on the first half of it. It was woking before I loaded RH9 to the second partition on the same disk. After installing RH9 I rebooted the system and now I get a *"grub >"* prompt. Since I'm new to Linux, what steps must I do at this prompt?

Thanx for your help!

Eric


----------



## GoBoy (Jul 14, 2004)

Hi

I have Xp Pro and Red Hat 9, but they are on separate hard disc drives. Xp is on 120gb Maxtor and RH 9 is on 40gb Maxtor. What do I do in my case? Anyone know any links or can give me any feedback? Alternatively I am booting from a floppy disc to get into Linux, is there a way to make a floppy/CD-R with the updated kernels? Cheers,

John


----------



## Whiteskin (Nov 16, 2002)

Really, the best way (in my opinion) to install a bootloader is to throw it into the MBR, especially when dual booting windows. You need to ensure that windows is installed already, then overwrite the windows mbr. When you do that, with a linux installer it will be able to boot both linux an windows. 

For GoBoy, I think that you need to add a second stanza to your grub.conf, including hdb (I can't remember the grub naming system. I believe it would be 1,0 though I'm not entirely sure).


----------



## tsunam (Sep 14, 2003)

hai it'd be hd(1,0) (assuming its the first partion of the second drive)


----------



## saikee (Jun 11, 2004)

I am somewhat ashamed of not getting a share such booting problems and described the way I did it in  here


----------

