The GRUB2 files went missing under the /boot directory. Missing ‘/boot’, /boot/grub2 folder and /boot/grub2/grub.cfg file which are essential to boot the system. How to recover these missing boot files?
Follow the steps outlined below to recover the missing files under /boot directory.
1. Verify if the Boot directory contents are really missing or the /boot is not mounted itself:
# ls /boot/grub2/ # mount | grep boot
2. Install the GRUB2 again using the “grub2-install” utility.
# grub2-install /dev/[disk name]
3. Create grub.cfg file:
# grub2-mkconfig -o /boot/grub2/grub.cfg
4. Create device.map file if missing:
# vi /boot/grub2/device.map (hd0) /dev/[disk name]
5. Reboot the system.
# shutdown -r now