Grub Special Boots and
Copyright (C) 2005 by Steve Litt,
rights reserved. Material
provided as-is, use at your own risk.
This document contains a series of exercises accessing, and in some
cases overwriting, your boot loader. There's a significant possibility
of overwriting your existing boot loader, which can lead to lost time
and even lost data. There may be other risks.
You use this document at your own risk. I am not responsible
for any damage or injury caused by your use of this document, or caused
by errors and/or omissions in this document. If that's not acceptable
you, you may not use this document. By using this document you are
accepting this disclaimer.
I'm not a Windows authority. I stopped buying commercial software in
1999, therefore never upgrading Windows past Win98 version 1. My
knowledge of Win2K and WinXP is that of an occasional user (at somebody
else's office). Therefore, I'll tell you how to set up grub for a
Win98/Linux dual boot, but you'll need to extrapolate up to Win2K and
It's absolutely essential you undertand the contents of Grub From the Ground Up before attempting anything
on this page!
Linux/Windows 98 Dualboot Grub
This document DOES NOT attempt to tell you how to create a partition
for Windows. Creating such a partition on a live Windows machine is
dangerous to the preexisting Linux system. There are plenty of ways to
do it, but be aware that Linux fdisk and Windows fdisk are not
compatible, although I have personally (carefully) used both to create
a dual boot.
Once you've installed Windows 98 on a DOS type partition, and the Linux
partitions are also still intact, you can begin. Booting the computer
will boot Windows 98 because Windows 98's install assumes it's the only
operating system worth running, and blows away the former contents of
the disk's MBR.
The first step is to insert your grub diskette and reboot.
If the grub diskette presents a menu, and you think that menu will boot
Linux correctly, by all means chose it. Otherwise press c to get the grub command
prompt, and enter the
proper commands to boot the Linux installed on your system.
Once booted, assuming Windows is on /dev/hda4, add the following to
map (hd0,0) (hd0,3)
map (hd0,3) (hd0,0)
The first map line maps
(hd0,3) to (hd0,0). This is important because Windows can only boot
from the first partition, so this command fakes Windows into thinking
that the fourth partition is really the first. The second line maps the
former first partition to the fourth, presumably to get it out of the
way. Note that if the Windows partition is the first partition on the
first drive, you can and should eliminate the map commands.
The third line is just like a standard grub root command except that it
doesn't attempt to mount /dev/hda4, which would cause all sorts of
havoc in Windows. Note that the (hd0,3) is from Grub's perspective --
from Windows' perspective that drive is (hd0,0).
The final line loads the chainloader, which then loads the Windows boot
loader on /dev/hda4.