Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Installing Windows after installing Linux



TLUG,

I installed a second hard drive in order to install Windows XP. I managed to get XP installed while leaving Ubuntu alone by changing the boot order of hard drives in my CMOS during the install.

At this point I have Linux on my main HD, which is an SATA drive, and Windows on an regular old IDE drive. They both work okay, and I can even browse the Windows drive, in /media/windows from within Linux.

The only issue remaining is configuring GRUB to allow me to select which OS to go to at boot time. Right now GRUB has no idea the Windows drive exists at all.

Of course, I hit the 'net in search of GRUB configurations, and found that I need to edit a file called /boot/grub/menu.list.

What I need to put in there is an entry like this:
title        Windows XP
root        (hd0,0)
savedefault
makeactive
chainloader +1

At least one problem is that root (hd0,0) section. It says the same thing for all my Linux boot options:
title        Ubuntu, kernel 2.6.15-20-686
root        (hd0,0)
kernel        /boot/vmlinuz-2.6.15-20-686 root=/dev/sda1 ro quiet splash
initrd        /boot/initrd.img-2.6.15-20-686
savedefault
boot

I think that (hd0,0) is a standard option for when Windows is installed first, as seems to be the case with most, if not all, help files I see on the web.

But in my case, since Linux occupies (hd0,0), I need to determine what the right settings for the Windows drive is.

After a little more searching, it seemed that the output of fdisk is relevant:
dave@example.com:~$ sudo fdisk -l

Disk /dev/hdb: 30.7 GB, 30738677760 bytes
255 heads, 63 sectors/track, 3737 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *           1        3736    30009388+   7  HPFS/NTFS

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       29647   238139496   83  Linux
/dev/sda2           29648       30401     6056505    5  Extended
/dev/sda5           29648       30401     6056473+  82  Linux swap / Solaris


But, here's where I hit a snag. In all the howto pages that I looked at, there was a quantum leap from taking the information under "Device Boot" to what goes into the menu.lst file.

For example, one site I'm looking at says that if a Windows partition is at /dev/hda5, then the right entry for menu.list is (hd0,4). But it doesn't say how you derive one from the other.

And that is why I am turning here. What am I supposed to enter into menu.lst if my Windows drive is at /dev/hdb1?

Thank you for any advice.

--
Dave M G


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links