E.3. 安装 GRUB


In a vast majority of cases, GRUB is installed and configured by default during the installation of Red Hat Enterprise Linux. However, if for some reason GRUB is not installed, or if you need to install it again, it is possible to install grub manually.
On systems without UEFI firmware, a valid GRUB configuration file must be present at /boot/grub/grub.conf. You can use the grub-install script (part of the grub package) to install GRUB. For example:
# grub-install disk
使用系统 boot 驱动器的设备名称(比如 /dev/sda)替换 disk
On systems with UEFI firmware, a valid GRUB configuration file must be present at /boot/efi/EFI/redhat/grub.conf. An image of GRUB's first-stage boot loader is available on the EFI System Partitition in the directory EFI/redhat/ with the filename grubx64.efi, and you can use the efibootmgr command to install this image into your system's EFI System Partition. For example:
# efibootmgr -c -d disk -p partition_number -l /EFI/redhat/grubx64.efi -L "grub_uefi"
Replace disk with the name of the device containing the EFI System Partition (such as /dev/sda) and partition_number with the partition number of your EFI System Partition (the default value is 1, meaning the first partition on the disk).
有关安装 GRUB 的附加信息请查看 《GNU GRUB 手册》grub-install(8) man page。有关 EFI 系统分区的详情请查看 第 9.18.1 节 “高级引导装载程序配置”。有关 efibootmgr 工具的详情请查看 efibootmgr(8) man page。
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.