No. (1) did the same (correct) job twice. Either half of (1) gets it done.
(2) was incorrect. /boot/efi/EFI/fedora/grub.cfg is a file, not a link. The main purpose of that file is to tell grub2 how to find grub2/grub.cfg (which partition it is in). Your command incorrectly puts the contents that should be in grub2/grub.cfg into EFI/fedora/grub.cfg instead. That might then seem to work (or might be badly messed up). But even if it seems to work, unless something later restores or corrects the EFI/fedora/grub.cfg file, future automatic updates will be messed up.
According to GRUB 2, sub-heading " Updating the GRUB configuration file" …I quote:
Use the following commands:
sudo grub2-mkconfig -o /etc/grub2.cfg
sudo grub2-mkconfig -o /etc/grub2-efi.cfg
It seems to readers that they have to execute both these commands in sequence, yes? The statement does not say “Use either one of the following commands”…
Thanks very much for the warning. I guess the best fix now is to re-install the distro.
You don’t need anything that drastic. I expect the answer Joe gave is correct on how to use the standard tools to replace that file (I generally don’t do it that way myself)
But I assume you accidentally failed to show half that file. Otherwise, what you showed must not be whatever is actually in use on your system.
I would fix one simply by copying that and editing in the correct UUID (of your boot partition). There are many easy ways to discover the UUID of your boot partition. It is typically in /etc/fstab as the way that partition gets mounted.
So either to check whether the command Joe gave you worked, or to fix things if it didn’t, you could just edit the right contents into that file (5 lines including the unnecessary blank line in the middle, that tools put there by default).
This works under one condition only.
The user must first remove the existing /boot/efi/EFI/fedora/grub.cfg and /boot/grub2/grub.cfg. At that point the reinstall will create both files with the proper content. If the files already exist they will not be overwritten.