MX-15/16 Tutorial Restore grub in EFI or Legacy mode
Posted: Sun Mar 27, 2016 5:35 pm
Fast Fix MX Grub From MX
If you want to have the MX Grub, then from MX for Legacy Mode:
Boot repair from MX Tools,
Or open the terminal:
Then:
For Uefi Mode
Find first your Uefi partition to mount.
Where sdaX your EFI partition and run the command.
If for some reasons it doesn’t work follow steps 1.7 to 1.10. for Uefi or Legacy.
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,
1.2. Then the command, to see which partition has your OS.
1.3. After the command, where X is your OS partition.
1.4. Now you have to mount, bind and chroot mnt, with the follow command,
1.5. To verify that you are in the right partition run the command.
1.6. If for any reason something went wrong run exit command to execute again the procedure.
Fix Grub on Uefi mode
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.
1.8. Next is to find where is the EFI partition, run the command:
It would look like:
2 1050MB 1322MB 273MB fat32 EFI system partition boot, hidden, esp
1.9. Replace the command sdaX with yours and run.
Fix Grub on legacy mode
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.
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.
Modify or add the missing commands:
Save and Close the document and next:
Next time your PC or laptop will start with last OS you used.
Enjoy MX Linux.
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.