Jump to content


Linux Newbie - Editing grub.conf

  • Please log in to reply
2 replies to this topic

#1 joshua



  • Members
  • 3 posts

Posted 15 October 2003 - 07:57 PM


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:
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.img
title 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.


#2 blueworm



  • Members
  • 169 posts

Posted 15 October 2003 - 11:59 PM


#3 joshua



  • Members
  • 3 posts

Posted 16 October 2003 - 03:07 AM

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:

title Windows XP
    map (hd1) (hd0)
    rootnoverify (hd0,0)

"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.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

IPB Skin By Virteq