If you want to have the MX Grub, then from MX for Legacy Mode:
Boot repair from MX Tools,
Or open the terminal:
Code: Select all
sudo su
Code: Select all
grub-install /dev/sda ; update-grub
Find first your Uefi partition to mount.
Code: Select all
sudo su
Code: Select all
parted -l
Code: Select all
mount /dev/sdaX /boot/efi ; grub-install /dev/sda ; update-grub
Method Reinstall broken Grub
Reinstall broken Grub from Live Medium, DVD, USB
When you run the MX Live Medium, DVD, USB, open the terminal.
Step1
1.1. Run the command,
Code: Select all
sudo su
Code: Select all
lsblk -f
Code: Select all
mount /dev/sdaX /mnt
Code: Select all
mount --bind /dev /mnt/dev && mount --bind /sys /mnt/sys && mount --bind /proc /mnt/proc && chroot /mnt
Code: Select all
lsb_release -a
Code: Select all
exit
1.7. Reinstall grub-efi it will ask you to remove grub-pc and mx-bootrepair you will say yes because both are for legacy mode and you don't need them.
Code: Select all
apt-get install --reinstall grub-efi
Code: Select all
parted -l
2 1050MB 1322MB 273MB fat32 EFI system partition boot, hidden, esp
1.9. Replace the command sdaX with yours and run.
Code: Select all
mount /dev/sdaX /boot/efi ; apt-get install --reinstall grub-efi-amd64 ; grub-install /dev/sda ; update-grub
1.10. The most pc, laptop have the grub installed on sda where Windows are, and it is the correct way if you are dual boot with Windows. Enter the following command.
Code: Select all
apt-get install --reinstall grub ; grub-install /dev/sda ; update-grub
If you run from live medium you can restart to find again you OS.
If you like to remember your grub the last operating system you have used then:
1.11.
Code: Select all
sudo leafpad /etc/default/grub
Code: Select all
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
Code: Select all
sudo update-grub
Enjoy MX Linux.