第 13 章 Reinstalling GRUB
You can reinstall the GRUB boot loader to fix certain problems, usually caused by an incorrect installation of GRUB, missing files, or a broken system. You can resolve these issues by restoring the missing files and updating the boot information.
Reasons to reinstall GRUB:
- Upgrading the GRUB boot loader packages.
- Adding the boot information to another drive.
- The user requires the GRUB boot loader to control installed operating systems. However, some operating systems are installed with their own boot loaders and reinstalling GRUB returns control to those operating systems.
GRUB restores files only if they are not corrupted.
13.1. Reinstalling GRUB on BIOS-based machines 复制链接链接已复制到粘贴板!
You can reinstall the GRUB boot loader on your BIOS-based system. Always reinstall GRUB after updating the GRUB packages.
This overwrites the existing GRUB to install the new GRUB. Ensure that the system does not cause data corruption or boot crash during the installation.
Procedure
Install
grub2-pc:# grub2-pcReinstall GRUB on the device where it is installed. For example, if
sdais your device:# grub2-install /dev/sdaReboot your system for the changes to take effect:
# rebootSee the
grub2-pc(8)man page on your system for more information.