How to Fix broken boot loader

This Post updated 2020-06-01

OpenMandriva Lx uses grub2 boot-loader. So grub2 commands would work.

The command to probe computer and write comprehensive grub2 menu is:

$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

In most circumstances this simpler command will work:

$ sudo update-grub2

Then to install the grub2 boot-loader to the drive you wish to boot from:

$ sudo grub2-install /dev/xxx

Where you replace the “xxx” with the name of the drive you want to, or were booting OM Lx from, like sda or if it is a nvme drive something like nvme0n1.

To do this obviously you need access to your OM Lx system. It you don’t have easy access you can try Rescatux & Super Grub2 Disk. For this task I would try Super Grub2 Disk first. Another way to access the broken system is with a chroot from another Linux operating system as described here.

To find how your storage devices or drives are called user can simply open KDE Partition Manager or from Konsole run this command:

$ sudo fdisk -l

Additional information: The commands ‘grub2-mkconfig’ and ‘update-grub2’ use the utility called ‘os-prober’ to probe the computer for other operating systems. User can run this command independently to see if os-prober is correctly recognizing all other operating systems on users computer. Like this:

$ sudo os-prober

1 Like

Note: Currently doing chroot from OM Lx ISO’s does not work due to a missing file. The file was removed due to problems with the ISO booting in VirtualBox if that file was present.

1 Like

Little more on these. Rescatux has a utility, Rescapp, to actually change or fix things in grub2 boot loader. However I have found that it does not boot on my desktop (Ryzen5 3600 cpu, AMD/Radeon R7-240 gpu). It does boot in notebook with Intel graphics. I found the Rescapp menu difficult to understand until I poked around for a bit…

Super Grub2 Disk simply provides a list of options for user to boot in to, you pick the one you want and boot then presumably you would fix any problems in the installed system. Super Grub2 Disk works on all hardware I’ve tested it on.