This tutorial applies for Grub version 1.
Using Ubuntu Live CD, here are the steps:
1. Open terminal, run grub
$ sudo grub
2. On grub command prompt, find boot record
grub> find /boot/grub/stage1
or, if result an error, change to:
grub> find /grub/stage1
3. Make root. Change X,Y with the number of partition from find command result
grub> root (hdX,Y)
4. Make setup. Change X with the number of partition
grub> setup (hdX)
5. Finish. Exit grub and restart.
grub> quit
It will create dual boot of Ubuntu and Windows.