Skip to content

Repair a non-booting GRUB

EndeavourOS comes with GRUB pre-installed and, in case you don’t know what GRUB is, it is one of the first screens that displays the Linux kernels you have installed on the system.

It plays an essential part in booting up your EndeavourOS system but sometimes due to an update or perhaps because of you tinkering with the system, Grub refuses to boot.

Don’t worry there are only a couple of steps needed to repair GRUB, so you can get into the system as you’re used to.

First, you have to Chroot into the system, just follow the steps described in these article:

Arch-Chroot wiki on discovery

To validate if you are on UEFI or not run:

sudo efibootmgr

It Will show like so if you are booted in UEFI mode.
And like this if you are booted in Bios legacy mode (MBR)

Before you proceed, these instructions are made for a standard automatic installation, if you installed the system with a modified manual partition scheme, just ask our community on the forum and make sure you provide them with the needed logs with our log tools.

Repair GRUB on BIOS systems

If you have more than one operating system installed on your machine, run os-prober first before you proceed. This package will scan all your operating systems installed and put them in GRUB. If you only have EndeavourOS installed go directly to step two.

  1. reinstall GRUB:

grub-install --target=i386-pc /dev/sdX

Remember, the X must be replaced with the letter that is marked in your situation, for instance, /dev/sda

2. Rebuild grub.cfg configuration file:

grub-mkconfig -o /boot/grub/grub.cfg

Now GRUB is repaired and you should be able to boot into your system again.

Repair GRUB on EFI/UEFI systems

Before you are going to repair GRUB, you should also check your EFI-boot-settings, this also can be the reason why GRUB isn’t booting. Just check our forum for those settings.

If you have more than one operating system installed on your machine, run os-prober first before you proceed. This package will scan all your operating systems installed and put them in GRUB. If you only have EndeavourOS installed go directly to step two.

Mount all the root partitions on your machine as described in the Arch-chroot article above, this will speed up the process. Then type: (as root)

  1. reinstall GRUB files:

only grub-install is needed no need to add any options (at least on EndeavourOS where we use the default efi-path /boot/efi what is the default used for the command already. The --bootloader-id option will create a new entry with the given ID that in some cases will not get set as the default boot entry in the firmware.

If not used it will use the GRUB_DISTRIBUTOR= entry from the grub main config in /etc/default/grub, in case this is not the same as used before for bootloader-id it will create a new entry.

So best practice will be to use the existing ID you can check with efibootmgr :

default boot entry is 0004 that has the bootloader-id endeavouros-4084

so using this as --bootloader-id option will make sure you will boot on the fixed files you just install.

grub-install --bootloader-id=endeavouros-4084

would be the command to use in this example.

2. Rebuild the grub.cfg configuration file:

grub-mkconfig -o /boot/grub/grub.cfg

Now GRUB is repaired and you should be able to boot into your system again.

Grub no longer has os-prober enabled per default:

https://wiki.archlinux.org/title/GRUB#Detecting_other_operating_systems

os-prober is troublesome in some cases, but it is used to autodetect other OS to add them to boot menu.

To re-enable os-prober usage for grub:

edit /etc/default/grub and change this:

GRUB_DISABLE_OS_PROBER=true 
to false:
GRUB_DISABLE_OS_PROBER=false

save the file and regenerate grub.cfg again:

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

Alternative to GRUB

There is an alternative for using GRUB, it’s is called rEFInd and you can read more about it over here:

Connect with us:

Repair a non-booting GRUB

  • by
%d bloggers like this: