SuSE 9.x and some versions of RedHat use GRUB as a bootloader. This is fine, except for the fact that they universally mess up the configuration of it for getting Windows to work.
My recipe for dual boot:
1) I prefer to have Linux and Windows on entirely separate hard discs. It is now possible to resize NTFS partitions from within the SuSE/RH/MDK installer if you need to cram both OS on a single hard disc. I prefer to have Linux on e.g. the primary master and Windows on the primary slave - this way there is no contamination between different operating systems.
It is acceptable to have Windows on the master and Linux on the slave, but your Windows drive will be modified to include the Grub boot loader - if it goes wrong, that's two OS down the tubes.
2) Install WinXP or 2k first, with its drive set as primary master, then just jumper it as slave. Windows won't recognise anything different.
3) Set up Linux according to whichever howto/manual/FAQ you like. There are enough about.
3a) Every installer, especially SuSE, gives you the option to edit the bootloader configuration manually prior to installation. This is where you can correct the error they always make before you have any problems. Since every installer is different, I won't describe how to find the relevant menu - it should be fairly self-evident. You can always fix it later in Linux.
4) Once you get the bootloader config on screen, you'll be presented with something like this:
Code:
default 0
timeout 8
splashimage=(hd0,1)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.5
root=(hd0,1)
kernel=(hd0,1)/kernel-2.6.5-gentoo-r1 root=/dev/ram0 init=/linuxrc real_root=/dev/hda5 vga=0x317 splash=verbose
initrd=(hd0,1)/initrd-2.6.5-gentoo-r1
title=Windows XP Home Edition
root (hd0,0)
chainloader +1
This is for a single-disc installation with WindowsXP installed first. What you need to pay attention to is the Windows section, and know that it is WRONG!
Grub checks the partition type to see whether it is valid before it attempts booting. If it doesn't recognise the partition type, it will fail with either an error, a string of zeros or just a blank screen.
What you need to do is edit the Windows segment according to your installation type:
For the above example: Windows shares a disc with Linux, OR Windows is primary master, Linux is primary slave
Code:
title=Windows XP Home Edition
rootnoverify (hd0,0)
makeactive
chainloader +1
The rootnoverify command disables Grub's partition checking, just assuming that it'll find a valid OS. Makeactive only works for *primary* partitions - it sets Grub's root so that full paths no longer need to be given. Chainloader +1 looks at the first sector of the specified device for an OS. The three commands put together
in this order allow WindowsXP/2k to boot successfully.
If, like me, you put Linux on the primary disc and Windows on the secondary (has the advantage that if Linux fries, you can set BIOS to boot Windows automatically) then you will need to use the
map command:
Code:
title=Windows XP Home Edition
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1
This creates a virtual "swap" between the master and slave drives. It only works when the operating system uses BIOS to determine device location. If a driver is used (e.g. for an external card or for a RAID array) this will fail. Windows can be booted without it, but it sometimes gets uppity.
5) Reboot, check both OSs work, and enjoy