Boot with Ubuntu Live CD
in terminal type
(If your ubuntu installation is on sda3)
mkdir /media/mnt
mount /dev/sda3 /media/mnt/
mount -o bind /dev/ /media/mnt/dev
chroot /media/mnt => We are in the disk that we want to install grub
Then:
grub-install /dev/sda