EndeavourOS bootloader not working after BIOS update

After following advice on a separate issue described here I updated my BIOS. Although it completed without issue, now my computer only boots into Windows 10. Previously I had rEFInd as the first boot option but now only Windows boot manager is showing up in the BIOS settings (from both storage devices where the OSs are installed). I was attempting to follow the advice here, replacing nvme0n1p2 with sda2. However, when attempting to run bootctl install, I get this error.

Couldn’t find EFI system partition. It is recommended to mount it to /boot or /efi.
Alternatively, use --esp-path= to specify path to mount point.

Further, when I attempt to mount to sda1 or sda instead I get this error:

mount: /dev/sda1: can’t find in /etc/fstab.

The contents of the fstab file in the EndeavourOS hard drive can be seen here - https://privatebin.net/?3274696e8c40a87f#7G6D8HD11khnidW6nsaqF79J1j4tf6Z6JdTyo69mT3kR

In case you need it, the outputs for sudo parted -l and efibootmgr are linked. I can change the boot order just fine via the BIOS settings. Any help would be greatly appreciated.

1 Like

Let’s try this and see if we can get it working.

Open a terminal in the live session and follow the steps below:

  1. sudo mount /dev/sda2 /mnt

  2. sudo mount /dev/sda1 /mnt/efi

  3. sudo arch-chroot /mnt

Inside chroot:

  1. bootctl install

  2. reinstall-kernels

  3. run lsblk -f and make sure that the UUID for your ESP (dev/sda1) matches the one in your /etc/fstab

If you get any error messages at any of the steps above, stop and post the whole of the terminal output and the command line that you have run.

If all is fine so far:

  1. type exit followed by enter to quit chroot

  2. check with efibootmgr to see if you have an entry for Linux Boot Manager

  3. reboot

:speech_balloon:
:robot:

3 Likes

Since you updated the BIOS you may also want to make sure that Secure boot is still disabled.

Maybe you can create a UEFI menu entry for rEFInd (or more) bootloader(s).

_partition="$(sudo blkid --uuid "560D-ECA4")"
_mountpoint="/mnt/lost/efi"
sudo mkdir -p "$_mountpoint"
sudo mount "$_partition" "$_mountpoint"
_D="/dev/$(lsblk -no PKNAME "$_partition")"
_P="$(lsblk -no PARTN "$_partition")"
mapfile -t _Loaders < <( find "$_mountpoint" -name "*.efi" | sed -nE '/microsoft/Id;s|^'"$_mountpoint"'||p' )
for _loader in "${_Loaders[@]}" ; do sudo efibootmgr -c -d "$_D" -p "$_P" -l "${_loader//'/'/'\'}" -L "$(basename -s .efi "$_loader")" ; done

As always,

Finally, check for results in UEFI boot menu:

efibootmgr -u
Explanation for the commands

Since we know the old ESP UUID, we get the partition name ( _partition: )
We need to mount the ESP, so we can search for existing bootloaders. We use a fresh mount folder _mountpoint , in case /mnt contains data from old actions.
We get drive _D and partition _P , in the efibootmgr required format, using lsblk.
We search for bootloaders (*.efi) in the ESP with find, excluding Microsoft-related ones, and removing the prefixed _mountpoint, so they can become --loader for efibootmgr. In case there is more than one bootloader, we save the result in an array (_Loaders), so we can create menu entries for all of them.
Finally, we run efibootmgr to create new entries (-c), converting the loader path to backslashes format (WinTypeFat), and using the bootloader filename (w/o extension) for a menu entry label.

Just to inspire new users for what is possible if you decide to RTFM :wink:
and in case i made a mistake, others can inspect and correct, if necessary. :sunglasses:

Thank you all for your continued patience and support. After following the commands here, I am able to boot into EndeavourOS once again. The only oddity that occurred is that lsblk -f had no UUID for any of the drives, but since the boot is now working I think this can be disregarded.

Since you updated the BIOS you may also want to make sure that Secure boot is still disabled.

This is not even an option on my BIOS and the Windows system information state that it is disabled.

With this all said the issue can now be closed. Thank you all once again for your help.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.