@OP
Boot from Live CD and mount your Ubuntu /boot partition, if you didn't created separate /boot then open the / partition.
Verify if your partition is correct.
You should see output similar to this:
/dev/sda2 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type ext4 (rw,nosuid,nodev,uhelper=devkit)
Note the designation for the disk /dev/sda which you will be using later, and the directory in /media.
Use Tab Completion in Terminal to complete the path. Hitting the <TAB> key will automatically finish file names, directory locations, and other long or hard to type file names.
To make sure this is indeed the Ubuntu boot partition, run
ls /media/0d104aff-ec8c-44c8-b811-92b993823444/boot
But substitute the example's UUID, 0d104aff-ec8c-44c8-b811-92b993823444, with your volume's UUID which you found earlier. If your boot partition was a separate partition which you mounted in a previous step, use this instead
ls /media/0d104aff-ec8c-44c8-b811-92b993823444
In either case, the output should be something like this:
config-2.6.18-3-686 initrd.img-2.6.18-3-686.bak System.map-2.6.18-3-686
grub lost+found vmlinuz-2.6.18-3-686
initrd.img-2.6.18-3-686 memtest86+.bin
If what you have is not similar, unmount it and try another partition.
Now that everything is mounted, we just need to reinstall GRUB by specifying the correct directory and the correct drive name:
sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda
If you get BIOS warnings try:
sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda --recheck
Replace /dev/sda with the location you want to install GRUB on.
If all went well, you should see something like this:
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0) /dev/sda
Reboot, making sure to boot to your hard drive and not to the live CD. Grub should be installed and both Ubuntu and Windows should have been automatically detected and listed in the menu.
Copy pasted from *help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows