Jump to content
Compatible Support Forums
Sign in to follow this  
joshua

Linux Newbie - Editing grub.conf

Recommended Posts

Hello

 

I am trying to set up a dual boot system with Windows XP on one HDD and Red Hat 9 on a second one. Originally, my computer just had Windows XP Home installed on it, and only one HDD.

 

Since I do not have the time to back up all my information, or do any reinstalls of Windows, I decided to play it safe. I have installed a second HDD and put Linux on it. By default, the BIOS tries to boot from it. This means that the MBR on my second Linux drive is being read and Grub is set up to let me boot either Linux or to switch to the other HDD to boot Windows.

 

But here's my problem.

 

My Windows HDD is an 80Gb Seagate Baracude ATA 150, and my Linux drive is only a 40Gb 7200rpm IDE drive. So when I installed the second drive, it was automatically assigned IDE0 due to the fact that it is the only IDE HDD on my computer. This should allow the scenario I outlined above to work properly, however, there is one small problem. When I try to select Windows from Grub, Windows won't boot.

 

I think that the problem is in my grub.conf file. For reference, here is part of the grub.conf file:

Code:
title Red Hat Linux (2.4.20-8)    root (hd0,0)    kernel /vmlinuz-2.4.20-8 ro root=LABEL hdd=ide-scsi    initrd /initrd-2.4.20-8.imgtitle Windows XP    rootnoverify (hd0,0)    chainloader +1

 

It appears to me, a Linux n00b, that Grub is trying to boot Windows(named DOS) from the same HDD as Linux. I need to change the value 'hd0' to the correct value for my ATA 150 drive. I know that my Windows drive is 'hde' but when I put 'hde1' into grub.conf, it doesn't work.

 

Linux boots fine right now. If I pull the IDE cable out of the back of the second HDD, the BIOS defaults back to using my ATA drive for the MBR, and as such, Windows boots fine. However, using Grub on the second HDD does not allow me to boot Windows.

 

I hope that this made sense. Let me know if you need any more information/clarification.

 

Thanks

Share this post


Link to post

Thanks for the link

 

I've managed to sort it out now, after a few hours in the GRUB documentation. Here's the fixed(and working) section the grub.conf file:

 

Code:
title Windows XP    map (hd1) (hd0)    rootnoverify (hd0,0)    makeactive    boot

 

"map" is used because Windows doesn't like to boot from any drive but the first one. So I had to make it think that the second HDD it is on is really hd0.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×