Skip to content

Instantly share code, notes, and snippets.

@dbfin
Last active November 29, 2023 11:41
Show Gist options
  • Save dbfin/6733294 to your computer and use it in GitHub Desktop.
Save dbfin/6733294 to your computer and use it in GitHub Desktop.
Update grub in Fedora
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
@lfom
Copy link

lfom commented Nov 10, 2021

Actutally, for UEFI systems:
sudo grub2-mkconfig -o /etc/grub2-efi.cfg

@Muku784
Copy link

Muku784 commented Sep 12, 2022

For UEFI systems: sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

Refrain from using grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg going forward. This is a valid location on Fedora 33 and earlier. However on Fedora 34 and later, it is a small stub file that merely forwards to /boot/grub2/grub.cfg. See the [Reinstalling GRUB] (https://fedoraproject.org/wiki/GRUB_2#Reinstalling_GRUB) section if you have accidentally overwritten this file.

https://fedoraproject.org/wiki/GRUB_2

The GRUB configuration file is located at /boot/grub2/grub.cfg and is intended to be a static file that does not need updating. In case of disk replacement, or installation of another Linux distribution, /boot/grub2/grub.cfg should be updated. Use the following commands:

sudo grub2-mkconfig -o /etc/grub2.cfg

sudo grub2-mkconfig -o /etc/grub2-efi.cfg 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment