LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Booting Windows from grub (http://www.linuxquestions.org/questions/linux-newbie-8/booting-windows-from-grub-577176/)

krimsonking 08-15-2007 12:25 AM

Booting Windows from grub
 
Hi, I am trying to setup grub to boot my Windows drive, but not sure exactly how to go about it. I have found some tutorials on how to do this, but they deal with having the two os's on the same drive, where as mine are on two individual SATA drives. I know I need to edit the /boot/grub/menu.lst file, but not sure of the exact syntax required. Any advice would be greatly appreciated, Thanks.

Just updating, I have added an entry to menu.lst, which is:
title Windows
root (sd2,0)
chainloader +1

Windows is located on /dev/sdc1, so I think this should be correct, but when I boot to it I get a grub 23 error: unable to parse number.

jay73 08-15-2007 02:38 AM

title Windows
rootnoverify (hd2,0)
map (hd0) (hd2)
map (hd2) (hd0)
makeactive
chainloader +1

syg00 08-15-2007 03:12 AM

As per jay73, but change all "hd2" to "hd1" if you only have 2 disks.

krimsonking 08-15-2007 05:13 AM

Hi, after making the changes suggested I now get an error saying that the disk is not bootable, although I know it is. Below is the readout from fdisk:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 263 2873 20972857+ 83 Linux
/dev/sda3 2874 9729 55070820 83 Linux

Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 14594 117218304 7 HPFS/NTFS

Disk /dev/sdc: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 7097 57004018 7 HPFS/NTFS
/dev/sdc2 7140 14593 59874255 7 HPFS/NTFS

Disk /dev/sdd: 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/sdd1 * 1 30402 244196352 c W95 FAT32 (LBA)

jay73 08-15-2007 06:04 AM

Maybe sdc does not correspond to hd2 because of BIOS settings? From the GRUB menu, select the windows boot line, press E, select the rootnoverify line and press E again. Delete the last bits so that you have only
rootnoverify (hd2,
and use the tab key to find out how that disk is partitioned. If you don't see any partitions at all, you can be sure that sdc is hd1 (or even hd3) and not hd2. Substitute
rootnoverify (hd2,
with
rootnoverify (hd1,
or
rootnoverify (hd3,
and retry completion.
If you do see the windows partititions this time, you need to edit GRUB to use
rootnoverify (hd1,0)
or
rootnoverify (hd3,0).


All times are GMT -5. The time now is 09:06 PM.