View Full Version : Boot windows from second HDD
mip
4th April 2004, 11:26 PM
How do I configure GRUB to boot windows from my second HDD? My first HDD has Fedora (Primary/Master) and my second has Win98 (Primary/Slave).
grub.conf currently looks like this:
title Fedora Core (2.4.22-1.2174.nptl)
root (hd0,0)
kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/1 hdc=ide-scsi hdd=ide-scsi rhgb
initrd /initrd-2.4.22-1.2174.nptl.img
title Windows
rootnoverify (hd1,0)
makeactive
chainloader +1
Cheers.
ghenry
5th April 2004, 09:12 AM
My grub line for a window dual boot machine I have lying around is:
title Windows XP Professional
rootnoverify (hd0,1)
chainloader +1
mip
5th April 2004, 09:19 AM
But I'm trying to boot windows from the first (and only) partition on the second HDD so shouldn't I be using:
rootnoverify (hd1,0)
Maybe I need to use the map command. I didn't think this would be necessary as there are no windows partitions on my first HDD.
ghenry
5th April 2004, 09:31 AM
I was just showing I that I didn't have makeactive in my setup.
mip
5th April 2004, 10:24 AM
Ah right. Thanks. I'll give it a go.
mip
5th April 2004, 09:21 PM
Removing the make active doesn't help. I now have:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.4.22-1.2174.nptl)
root (hd0,0)
kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/1 hdc=ide-scsi hdd=ide-scsi rhgb
initrd /initrd-2.4.22-1.2174.nptl.img
title Windows
rootnoverify (hd1,0)
chainloader +1
Any Ideas?
ghenry
5th April 2004, 10:58 PM
Could you paste your results from:
fdisk /dev/hda once you have typed 'p' for print.
Mine is:
Command (m for help): p
Disk /dev/hda: 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/hda1 1 65 522081 83 Linux
/dev/hda2 * 66 1595 12289693+ 7 HPFS/NTFS
/dev/hda3 1596 7180 44861512+ f W95 Ext'd (LBA)
/dev/hda4 7181 9729 20474842+ c W95 FAT32 (LBA)
/dev/hda5 1596 3508 15366141 b W95 FAT32
/dev/hda6 3509 4145 5116671 83 Linux
/dev/hda7 4146 4276 1052226 82 Linux swap
/dev/hda8 4277 4849 4602591 83 Linux
/dev/hda9 4850 6124 10241406 83 Linux
/dev/hda10 6125 6507 3076416 83 Linux
/dev/hda11 6508 6890 3076416 83 Linux
/dev/hda12 6891 7180 2329393+ b W95 FAT32
And your result from the command, with no options: mount
Mine is:
[root@blackhat root]# mount
/dev/hda6 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda8 on /home type ext3 (rw,usrquota)
none on /dev/shm type tmpfs (rw)
/dev/hda10 on /tmp type ext3 (rw)
/dev/hda9 on /usr type ext3 (rw)
/dev/hda11 on /var type ext3 (rw)
/dev/hdb3 on /mnt/sophies type vfat (rw,nosuid,nodev,umask=000)
/dev/hdb5 on /mnt/mp3s type vfat (rw,nosuid,nodev,umask=000)
/dev/hdb6 on /mnt/Gav_and_Lauras type vfat (rw,nosuid,nodev,umask=000)
/dev/hdb7 on /mnt/Images type vfat (rw,nosuid,nodev,umask=000)
/dev/hda4 on /mnt/Big2 type vfat (rw,nosuid,nodev,umask=000)
/dev/hda5 on /mnt/Big type vfat (rw,nosuid,nodev,umask=000)
/dev/hda12 on /mnt/magicfx type vfat (rw,nosuid,nodev,umask=000)
none on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hdd on /mnt/cdrom1 type iso9660 (ro,nosuid,nodev,user=slim_jim)
ghenry
5th April 2004, 11:05 PM
Also, the Grub manual expands on the windows options, so you can understand the various parameters a little more:
Grub Manual (http://www.gnu.org/software/grub/manual/grub.html#DOS%2fWindows)
Jman
5th April 2004, 11:33 PM
Windows doesn't like not being on the first partition of the first drive sometimes. Check out this (http://www.fedoraforum.org/forum/showthread.php?s=&threadid=975) (long) grub howto. The part about the 'map' function of grub is relevant, I think.
You will either have to switch the drives around or do some map magic, something like:
title Windows
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
makeactive
chainloader +1
grub documentation is also available with the 'info grub' command.
mip
6th April 2004, 09:12 AM
fdisk /dev/hda:
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 4985 39937590 83 Linux
/dev/hda3 4986 9702 37889302+ 83 Linux
/dev/hda4 9703 19457 78357037+ f Win95 Ext'd (LBA)
/dev/hda5 9703 9829 1020096 82 Linux swap
/dev/hda6 9830 19457 77336878+ 83 Linux
mount:
/dev/hda3 on / type ext3 (rw)
none on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda2 on /home type ext3 (rw)
/dev/hda6 on /mnt/media type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/hdb1 on /mnt/windows type vfat (rw,umask=0)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
gonzalo76
6th April 2004, 04:50 PM
Like Jman said, I think you should try with the 'map' command.
In your case, the Windows' lines in GRUB should be:
title Windows 98 SE
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
rootnoverify (hd1,0)
chainloader +1
Explanation of some commands:
map
Command: map to_drive from_drive
If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one.
Map the drive from_drive to the drive to_drive. This is necessary when you chain-load some operating systems, such as DOS, if such an OS resides at a non-first drive. Here is an example:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
This performs a virtual swap between your first and second hard drive.
Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won't work.
makeactive
Command: makeactive
Set the active partition on the root disk to GRUB's root device. This command is limited to primary PC partitions on a hard disk.
--------------------------------------------------
Taken from http://www.mcc.ac.uk/grub/grub_toc.html#SEC_Contents
Good Luck!
mip
6th April 2004, 11:38 PM
Thanks for the help everyone. Got it working with the following entries in grub.conf
title Fedora Core (2.4.22-1.2174.nptl)
root (hd0,0)
kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/1 hdc=ide-scsi hdd=ide-scsi rhgb
initrd /initrd-2.4.22-1.2174.nptl.img
title Windows
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1
Ug
7th April 2004, 08:37 AM
Nice info there. ;)
Resolved.
NetSurfer
25th February 2005, 04:37 PM
Thanks for the help everyone. Got it working with the following entries in grub.conf
title Fedora Core (2.4.22-1.2174.nptl)
root (hd0,0)
kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/1 hdc=ide-scsi hdd=ide-scsi rhgb
initrd /initrd-2.4.22-1.2174.nptl.img
title Windows
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1
Thank you very much..... worked also on a computer with Red Hat 9 (IDE1, master) and Win98 (IDE2, master)
Windows is becoming an "optional" OS, even if they don't like it!!
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.