Documentation errors on grub.cfg location for fedora 34 and up

I was just involved in a thread on using fedora

and encountered a user who was following the documentation for updating grub.cfg but the documentation he followed (official it seems) still shows the path for use of grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg.

I pointed him to the wiki
after he showed me the docs he followed.
Fedora 34
Fedora 35

It seems the change in grub.cfg needs to be made more public somehow and possibly the errors could be eliminated if the docs were to tell people to use the /etc/grub2.cfg and /etc/grub2-efi.cfg paths instead of the actual path since that is consistent across all recent versions of fedora where the path for grub.cfg on efi systems has changed between fedora 33 and earlier and fedora 34 and later.


Check out the “edit that page” link at the top right of the docs pages. You can either make a PR to fix it (awesome if you’re comfortable doing that) or file an issue Issues - fedora-docs/system-administrators-guide -

(Although, um, it does look like there’s already a number of issues about grub and that documentation reported.)

1 Like

Just tested with some of configurations from doc and from the wiki. I think you’re also right.

But when using $ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg it’s still work fine.

The way I test by adding and removing rhgb grub command on /etc/default/grub file and run $ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg.

You should try to on Fedora 35 Workstation. It’s should be safe.

But yes, only by using $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg also work fine on UEFI system.

Note: please mention me if it related to my statement. I also need to learn something.


I also tried with path to /etc/grub2.cfg and /etc/grub2-efi.cfg and also work fine since it’s basically both pointing to /boot/grub2/grub.cfg as symbolic link (checked also with $ sudo file /etc/grub.cfg and $ sudo file /etc/grub-efi.cfg. Need sudo since it pointing to directories belonging to root user).

The backward compatibility is awesome. But it should be more useful by pointing directly to EFI folder so we could get a sense where the configuration for UEFI system. It’s also more useful if we have another distros or Windows installed since it also saved their configuration on the same/shared EFI directories.

1 Like

You must not change the old GRUB2 EFI config directly.
It becomes invalid on kernel update.
Reinstall the package to restore the GRUB2 EFI config:

sudo dnf reinstall grub2-common

Changes/UnifyGrubConfig - Fedora Project Wiki

The file /boot/efi/EFI/fedora/grub.cfg on a new install of f34 & f35 is a minor bit of config and does very little except redirect grub to the file at /boot/grub2.cfg.

Running “sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg” will overwrite the default there and will not update the actual file. What that means is that people who are used to using the command this way are mystified when changes in grub are not properly updated with this command, especially when the kernel is again updated and changes are not seen in booting.

Since the change in grub with f34 I have gotten used to using the command as “sudo grub2-mkconfig -o /etc/grub2-efi.cfg” and so do not have to worry about changing the wrong file.

I’m not sure. But I always use /boot/efi/EFI/fedora/grub.cfg path. Also if each time I installing kernel on repo update-testing Fedora Bodhi to participate on kernel regression test it’s also work fine and my grub setting still same with my last change with /boot/efi/EFI/fedora/grub.cfg.

Please give me the actual scenario that my grub setting will break by using /boot/efi/EFI/fedora/grub.cfg path. I’ll apply it on my testing laptop.


Please also check this screenshot below. I just intentionally delete file on /boot/grub2/grub.cfg and using /boot/efi/EFI/fedora/grub.cfg generated from command sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg and my laptop still can boot normally.

I take a further test. I remove latest kernel 5.14.16 and reinstall it. After it finished installing, the installation did not recreate the file /boot/grub2/grub.cfg, it still empty. It’s mean that my system now rely on file /boot/efi/EFI/fedora/grub.cfg generated by grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg.

I reboot it and it’s still booting normally.

Maybe you could give another ideas?


@computersavvy Found that the changes proposed on the wiki, it’s make lot easier to troubleshoot when accidentally delete the folder on EFI/fedora/ since it just act as pointer to pointing the /boot partition. It also make easier to install two Fedora with different version on the same machine (dual boot). Hopefully the official documentation will change soon (I notice @grumpey already propose the change).