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.
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.
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.
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.
@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).