ubuntu reinstall grub code example
Example 1: ubuntu grub repair
sudo apt-add-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair
Example 2: install grub manually
# grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB
Example 3: install grub manually
# grub-mkconfig -o /boot/grub/grub.cfg