On a Debian-based system, a damaged GRUB configuration file is regenerated with the grub2-mkconfig command.