Boot Drive Dead

That command will permanently break the ability to update kernels unless the user makes repairs or manually repeats the command above with every kernel update.

The file you overwrote is created by grub as a pointer to the real grub.cfg at /boot/grub2/grub.cfg. The location of the grub.cfg file was changed about the release of f32 (5 years ago) and most users seem aware of the change.

Once changed as you did with that command the system will no longer automatically update it since the file under /boot/efi is a static file and only a pointer.

The only way I am aware of repairing it at present is to follow the following steps. (I was told recently that there is a new command being provided with the release of f43 to do the repairs differently, but for now these steps are required)

  1. Remove both grub.cfg files
    sudo rm /boot/efi/EFI/fedora/grub.cfg /boot/grub2/grub.cfg
  2. rebuild both those files properly
    sudo dnf reinstall grub2-common

Once this is done then the system should perform updates properly.

The grub2-mkconfig command should only be used with the output file as one of
/etc/grub2.cfg, /etc/grub2-efi.cfg (both symlinks) or /boot/grub2/grub.cfg (the real file).

I suspect that if a new kernel was installed as the update was performed it may not be bootable.

1 Like