If you ran in similar problem, Here's a quick way of fixing it,
Boot from Ubuntu Live CD
sudo grubIn (hd0,0) hd0 suggests first hard disk and 0 is the partition number (starting from 0, 0 means first partition). Also you can find out where the grub is installed by keying the command "find /boot/grub/stage1" in grub prompt.
grub> root (hd0,0)
grub> setup (hd0)
Then, Add following lines to /boot/grub/menu.lst or wherever grub is installed.
title Windows XPJust in case, if you have lost the boot record altogether ("Can't boot: Invalid Disk"): Boot from Windows CD and start repair just before installation, it will start recovery console. There, type in "fixboot". It is one of the risky windows command, see details here fixboot. Running it will restore the partition boot record and your system should boot (also you may like to use "fdisk /mbr" to restore, default jump on first partition boot record, your master boot record).