There are two ways to install GRUB to the MBR of a hard drive:
- From the prompt: use grub-install. Typical usage:
# /usr/sbin/grub-install --root-directory=/boot1 /dev/hda
Note: grub-install requires the existence of /usr/sbin/grub. Please see the man page for more details.
- From grub itself: use the setup command on your primary drive. Typical usage:
grub> root (hd0,0)
This can be done after loading grub on a running system or before booting on the grub command line. Please see the grub manual for more details.
grub> setup (hd0)
There may also exist shiny ways to do it in X-windows or something like that. Also, grub-install can do all sorts of tricks with the placement of stage1 and stage2.
1: Or wherever the parent of your grub directory is.