ideally, you want windows installed first - the windows installer will eat any non-windows boot loaders it sees.
however, it *can* be done this way round.
firstly, you need space for a windows partition. download a gparted livecd, and free up some space as an ntfs partition.
install windows to the blank partition (the windows installer should see it as c:\) - at this point, linux will no longer be bootable.
boot back into the gparted livecd, and open a terminal. type:
Code:
sudo grub
root (hdX,Y)
X and Y should equate to the drive number and partition number of your linux partition, counting from 0 - for example if your linux drive is "sda" and partition is "sda1", then use "(hd0,0)". If it's drive 3 partition 7, use "(hd2,6)"
X should be the same as before, usually 0
at this point, linux becomes bootable again - but windows doesn't.
reboot into your linux system, open a terminal, and run:
Code:
sudo gedit /boot/grub/menu.lst
this file defines all the partitions you can boot into. windows needs an entry. add the following, AFTER the line "### END DEBIAN AUTOMAGIC KERNELS LIST":
Code:
title Windows
root (hdX,Z)
savedefault
makeactive
chainloader +1
X and Z are the drive and partition number for your Windows partition. remember, start counting from 0, not 1.
save, quit, reboot, sorted.