Open your terminal.
If for any reason something went wrong, run (exit) command to execute again the procedure.
exit
1. Run the command:
sudo su
2. Then the follow command, to see which partition has your OS:
lsblk -f
3. After run the command and replace your OS partition where sdaX is. Now you will mount, bind and chroot mnt, with the follow command or each command separately after the symbol (;).
mount /dev/sdaX /mnt ; mount --bind /dev /mnt/dev ; mount --bind /dev/pts /mnt/dev/pts ; mount --bind /sys /mnt/sys ; mount --bind /proc /mnt/proc ; chroot /mnt
4. Verify your mounded system partition sdaX with the symbol (/) by running:
lsblk -f
Now you are at your OS to do whatever it needs in that case to fix grub.
If you don't have internet, fix internet by running as root the command:
tee /etc/resolv.conf <<!
nameserver 1.1.1.1
nameserver 1.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4
!
If the grub needs to be installed, check if sda is the correct drive, then run the command or each command separately after the symbol (;):
5. From lsblk -f command, find the /boot/efi partition and replace it at the command to fix the Grub:
mount /dev/sdaX /boot/efi ; grub-install /dev/sda ; update-grub
If it needs to be reinstalled Grub on disk sda for example:
mount /dev/sdaX /boot/efi ; apt-get install --reinstall grub-efi-amd64 ; grub-install /dev/sda ; update-grub
If it needs the kernel to be reinstalled, then:
apt-get install linux-image-`uname -r` ; update-initramfs -uk all
And then update Grub again.
If you think everything is ok, reboot and remove the USB.