Sometimes an update of the kernel breaks your current grub2. You will see an error like /usr/bin/grub2-editenv: error: invalid environment block
during execution of the update procedure.
In that case don't restart your machine because it is most likely that this will fail and then you'll have to fix it using chroot from a Live Media. Instead, immediately after the update showing up the error, fix it by executing the following as root:
dnf reinstall grub2-efi-x64 shim-x64
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Thanks for the gist! However, in my case it doesn't work!! (my /boot/efi/EFI/fedora/grubenv was empty) I could fix using this:
Rel: bugzilla