Sometimes grub-install fails even in the rescue mode.

The solution to this is : (change parameters according to your systems settings)
#grub <enter>
grub > install (hd0,6)/boot/grub/stage1 d (hd0) (hd0,6)/boot/grub/stage2 p (hd0,6)/boot/grub/menu.1st

this will change slightly if u have a separate boot partition.
#grub <enter>
grub > install (hd0,6)/grub/stage1 d (hd0) (hd0,6)/grub/stage2 p (hd0,6)/grub/menu.1st

ok the syntax is :
install <path to stage1> d <install device> <path to stage2> p <path to config file>