Linux grub-install命令:在设备上安装GRUB。
Linux grub-install命令 功能描述
使用grub-install命令可以将GRUB安装到指定硬盘或分区上。
Linux grub-install命令 语法
grub-install [选项] [安装设备]
命令中各选项的含义如表所示。
Linux grub-install命令 示例
安装GRUB到/dev/sda1分区的第一个扇区中
[root@rhel ~]# grub-install /dev/sda1
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script 'grub-install'.
# this device map was generated by anaconda
(hd0) /dev/sda
安装GRUB到主引导扇区中
[root@rhel ~]# grub-install /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script 'grub-install'.
# this device map was generated by anaconda
(hd0) /dev/sda