The program grub-install installs GRUB on your drive using grub-mkimage and (on some platforms) grub-setup. You must specify the device name on which you want to install GRUB, like this:
The device name install_device is an OS device name or a GRUB device name.
grub-install accepts the following options:
is equivalent to
grub-install --boot-directory=/boot/ /dev/sda
Here is an example in which you have a separate boot partition which is mounted on /mnt/boot:
grub-install --boot-directory=/mnt/boot /dev/sdb