Linux grub-install命令

Linux grub-install命令:在设备上安装GRUB。

Linux grub-install命令 功能描述

使用grub-install命令可以将GRUB安装到指定硬盘或分区上。

Linux grub-install命令 语法

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

Camera课程

Python教程

Java教程

Web教程

数据库教程

图形图像教程

办公软件教程

Linux教程

计算机教程

大数据教程

开发工具教程