If GRUB is overwritten or removed after installing another operating system, you can usually restore it from a Linux live USB or CD.
Boot into the live Linux environment and open a terminal. In this example, the installed Linux root partition is /dev/sda2 and GRUB will be installed to /dev/sda. Change these device names to match your system.
Recover GRUB from a live environment
First, mount the installed Linux root partition:
mount /dev/sda2 /media/linux
Bind the live environment’s device directory into the mounted system. This also helps avoid errors where grub-probe cannot find the device for the root filesystem.
mount --bind /dev /media/linux/dev
Now enter the installed Linux environment:
chroot /media/linux
Reinstall GRUB to the disk:
grub-install /dev/sda
After the command completes successfully, exit the chroot and reboot. Remove the live USB or CD when prompted.