Next: Invoking grub-mkconfig, Previous: Troubleshooting, Up: Top [Contents][Index]
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:
grub-install install_device
The device name install_device is an OS device name or a GRUB device name.
grub-install
accepts the following options:
Print a summary of the command-line options and exit.
Print the version number of GRUB and exit.
Install GRUB images under the directory dir/grub/ This option is useful when you want to install GRUB into a separate partition or a removable disk. If this option is not specified then it defaults to /boot, so
grub-install /dev/sda
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
Recheck the device map, even if /boot/grub/device.map already exists. You should use this option whenever you add/remove a disk into/from your computer.