How do I get grub to boot Windows from a second hard drive

I normally boot into Linux using grub so have linux as the first hard drive in my machine. I have Windows installed onto a second hard drive and am trying to get grub to boot it.

The grub config file contains

title Windows rootnoverify (hd1,1) chainloader +1 makeactive 

but it does not work.


The Windows boot loader assumes it's the first disk in the system. You need to tell grub to remap the two disks as part of the Windows entry in /boot/grub/menu.lst:

map (hd0) (hd1)
map (hd1) (hd0)

This is only an in-memory change to the way the chain-loaded boot loader sees the disks.

I had the same problem at one time, but like Ted said, you have to change the way the chain-loader sees the disk. Here how my grub menu list looks.

# on /dev/sdc1
title       Windows Vista Ultimate (loader)
root        (hd2,0)
map     (hd0) (hd2)
map     (hd2) (hd0)
chainloader +1

My computer boot from the second disk. This is done in the BIOS. On my first disk is MS DOS (and Debian...)

I'm booting my old MS DOS 6.0 like this:

# on the second disk ...known by the system as /dev/hda
title           MS DOS
root            (hd1,0)
map     (hd0) (hd1)
map     (hd1) (hd0)
chainloader +1

And this is how my disks look with fdisk -l

Disk /dev/hda: 20.0 GB, 20020396544 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          63      506016    6  FAT16
/dev/hda2              64         976     7333672+   f  W95 Ext'd (LBA)
/dev/hda3   *         977         989      104422+  83  Linux
/dev/hda4             990        1112      987997+  83  Linux
/dev/hda5              64         135      578308+   6  FAT16
/dev/hda6             136         976     6755301    7  HPFS/NTFS

Disk /dev/hdc: 6448 MB, 6448619520 bytes
255 heads, 63 sectors/track, 784 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1          13      104391   83  Linux
/dev/hdc2              14         784     6193057+  8e  Linux LVM

My reading of the hd(1,1) means 2nd drive, 2nd partition- is that where it is?

Category: linux Time: 2008-09-07 Views: 1
Tags: linux grub

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.198 (s). 12 q(s)