Fix broken boot loader

Tags: #<Tag:0x00007ff281c85ca0> #<Tag:0x00007ff281c85bd8>

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. Assuming that drive is /dev/sda:

$ sudo grub2-install /dev/sda

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.

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. So in theory we should be able to copy that file from an installed system to the booted ISO and then user could do repair from the chroot. Will post instructions when I get this sorted.

If you find any errors or anything that could be written better please let me know in the feed back thread.

If you have difficulty understanding any of this and need help. That is also for the feed back thread.

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.

Next thing needed in this thread is the list of commands for OM Lx user to use if they should happen to get Grub prompt or Grub rescue prompt.

Some man pages about this here and here. Grub2 manual here.