I use the MX Boot Repair tool often to fix GRUB issues cause by other distributions (especially Debian when it takes over my GRUB installation; for some reason the GRUB installed by Debian can never boot Arch based distros correctly).
I'm interested in learning the Terminal commands used by MX Boot Repair to "Reinstall GRUB bootloader" on my ESP. I looked int he MX Users Manual but didn't find them there.
I am aware of sudo update-grub but suspect there is something else.
Terminal commands for manual GRUB re-installation
-
- Posts: 41
- Joined: Tue Dec 04, 2018 10:47 pm
Re: Terminal commands for manual GRUB re-installation
The basic command is
And then you can add some parameters, more info about those you can find with
For example, when I use Boot Repair to reinstall my current grub, the command used is:
(you can find that in /var/log/mx-boot-repair.log)
Code: Select all
sudo grub-install
Code: Select all
man grub-install
Code: Select all
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=MX19.3 --recheck
-
- Posts: 41
- Joined: Tue Dec 04, 2018 10:47 pm
Re: Terminal commands for manual GRUB re-installation
Thank you! I didn't even realize there was a log file for MX Boot Repair that I could've referenced.(you can find that in /var/log/mx-boot-repair.log)
I just looked in my /boot/efi directory and see that there are two MX-related directories - MX19 as well as MX19.3
What is the purpose of both of these and can the MX19 be safely deleted?
Re: Terminal commands for manual GRUB re-installation
The name used by grub-install for the boot-loader can vary depending on which program you're using, so the original bootloader id can be different from one that was created later with MX Boot Repair. I suppose you're currently using the 'MX19.3' bootloader but to check that you can use
and 'BootCurrent: ...' will tell you which bootloader is in use. And then you could delete the other bootloader in /boot/efi/EFI
Code: Select all
sudo efibootmgr