wiki/distribution/guides/how-tos/fix-bootloader.md

1.9 KiB
Raw Blame History

title description published date tags editor dateCreated
How to fix broken bootloader true 2022-04-02T16:07:14.522Z documentation, howto, user-guide markdown 2020-09-10T21:59:11.289Z

How to fix broken boot loader

OpenMandriva Lx uses grub2 bootloader, so we use grub2 commands. 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 bootloader 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 OMLx from, like sda or if it is a nvme drive something like nvme0n1.

To do this obviously you need access to your OMLx system. It you do not have easy access you can try Rescatux or Super Grub2 Disk. For this task you may want to 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 the 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

Useful readings

Grub2 manual How to Rescue a Non-booting GRUB 2 on Linux Some man pages: 1 2