here is the simple solution :
A) boot from live cd of ubuntu
B) After boot from live CD enter below command to identify partition :
$ sudo fdisk -l
C) Now check the partition you have had and note down the partition where you have installed Ubuntu and then mount it on /mnt :
$ sudo mount /dev/sda1 /mnt
D) After mount Partition run below command :
$ sudo grub-install –root-directory=/mnt /dev/sda
here you go, you will get succefully installed message, so now remove CD from cd/dvd drive and restart computer with booting first priority of disk where you had installed ubuntu.
Hope this would help you to solve issue with grub.