Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

32.2.2. 重新安装引导装载程序

在某些情况下,GRUB2 引导装载程序会被错误地删除、损坏或被其他操作系统替代。以下步骤详细介绍了如何在 master 引导记录中重新安装 GRUB 的过程:

过程 32.3. 重新安装 GRUB2 引导装载程序

  1. 按照 过程 32.1, “引导进入 Anaconda 救援模式” 中的说明引导进入 Anaconda 救援模式。确保以读写模式挂载安装系统的 / (root)分区。
  2. 更改根分区:
    sh-4.2# chroot /mnt/sysimage/
  3. 使用以下命令重新安装 GRUB2 引导装载程序,其中 install_device 是引导设备(通常为 /dev/sda):
    sh-4.2# /sbin/grub2-install install_device
  4. 重启系统。