How to recover Manjaro's GRUB, explained by the project's Telegram channel bot in Spanish

Retrieve Manjaro grub

Since I started using Manjaro in his special edition for USB, currently unsupported, but not necessary either because you can better install directly, I can only find good words for this popular distribution based on Arch Linux. I always have the software up to date, not without first passing through the firewalls of the Unstable and Testing branches. But... it doesn't work equally well for all of us, or we don't all tinker the same, and there are users who end up making the manjaro grub Stop working

Although I don't understand how, perhaps because I usually keep my hands to myself or because I'm going to install it together with Windows, there are people who ask the community for help to recover Manjaro's grub. You can search for a lot of information, but I think none is as clear as the one provided by the Telegram bot of the Manjaro channel in Spanish. We can chat with him in private, it is recommended, but also add the bot to other groups and summon or ask for help from them.

Recover GRUB from Manjaro with these steps, by ManjaroLinuxEsBot

All of the following are the instructions that the bot tells us to recover Manjaro's GRUB in case of an accident.

  1. To recover the Manjaro grub, a Manjaro installation usb is used in live mode. The edition (KDE, GNOME, XFCE) of the installer does not matter. Yes it is worth that the ISO is as up-to-date as possible.
  2. To start the recovery, you have to boot the USB with the mode (BIOS or UEFI) of the Manjaro installation, that is, boot from the Manjaro USB in Live mode.
  3. After booting, we'll open a terminal/console and run this command to automatically mount our Manjaro installation:
manjaro-chroot -a
  1. If the utility is in doubt because different distros are installed, it will present a list for us to select our Manjaro installation. But normally it will do it automatically.
  2. As an optional and recommended step you can update the system with pacman -Syu, but it is possible that the system has no network and the command fails. If so, no problem either, it's an optional step.
  3. The only case in which you would have to obtain a network connection would be if, for some reason, the grub package was not installed on the system. In that case, you have to connect to the internet and run:
pacman -Sy grub

Install it in BIOS or UEFI mode

Depending on which mode you want to recover Manjaro from, you will have to install the grub loader in a slightly different way.

Install grub loader in BIOS mode.

  1. You need to identify which disk device grub will be installed on. To obtain information about the disks and their content, you can use, for example, the command:
lsblk -f
  1. The disk device where grub will be installed is usually in /dev/sdX or /dev/nvmeXnY format. Being X or Y numbers or letters that identify the disk in our system. For example /dev/sda or /dev/nvme0n1. Keep in mind that it has to be the entire disk and not one of the partitions it contains.
  2. Once the device has been identified, the following command must be executed, being /dev/XXX the disk where grub will be installed:
grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/XXX

IInstall grub loader in UEFI mode

  1. Run the command:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck

Regardless of what mode grub loader is installed in, run the following to create the grub configuration file:

update-grub

Then exit the chroot with:

exit

And restart the computer.

Extra step if there is dual boot

If there is another Windows/Linux system installed on the computer, it is likely that it was not detected in the previous process. To retrieve the corresponding grub entries, once Manjaro is booted, rerun:

sudo update-grub

Simple, but you have to follow the correct instructions

If we do everything that the bot explains to us, developed by the users of the community (I do not put the names to avoid SPAM), everything should return to normal.


A comment, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   MrDaza said

    Hello. We are happy to see what you have published from our bot. We are very grateful for the mention. Just one detail, we are not an official Manjaro channel on Telegram. We are a community of linux enthusiasts, supporting Manjaro users.

    regards

    Atte: Admin @ManjaroLinuxEs