Product SiteDocumentation Site

6.3. Recreating GRUB

This section describes the process for reinstalling the GRUB bootloader and recreating the configuration. Unlike legacy GRUB, which required users to manually create entries, GRUB2 will scan the system for bootable systems and automatically create the menu configuration. There are a number of reasons to reinstall GRUB:
The boot menu does not include an available operating systems.
The bootloader has been overwritten during installation of Windows or another operating system.
You have chosen not to use anaconda to install grub.

6.3.1. Refreshing GRUB configuration

To recreate the GRUB configuration from a booted system, use the grub2-mkconfig utility. The program will scan your system and create menu entries for what it finds. You should also use grub2-mkconfig after customizing menu entries, a process described in Section 6.4, “Configuring the GRUB Bootloader” If Fedora does not boot because of an invalid GRUB configuration, you can perform this procedure to repair it after following the instructions in Section A.1, “Setting up a chroot from a live image”.
Refresh GRUB configuration on a BIOS system:
# grub2-mkconfig -o /boot/grub2/grub.cfg
Refresh GRUB configuration on UEFI systems:
#grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
In most cases, this operation will detect any operating system available on your computer and create entries for them in the GRUB menu. Actually reinstalling the GRUB bootloader isn't required, just reconfiguring.