A working method to restore the Grub bootloader. Assuming the hard drive to be repaired is /dev/sda. If not, change accordingly.
Boot from a live CD, USB stick etc. Open terminal and execute the following commands:
sudo mkdir -p /mnt sudo mount /dev/sda1 /mnt sudo mount --bind /dev /mnt/dev sudo mount --bind /proc /mnt/proc sudo chroot /mnt sudo grub-install /dev/sda
Reboot