HomeAbout Blog

Fixing EndeavourOS Boot Failures

This post enumerates a process which worked for me to repair an installation of EndeavourOS with full-disk encryption when it is unable to boot. It is also available as a gist.

Specifically, this set of steps fixed the boot process on a HP-Envy laptop running EndeavourOS with an ext4 file system. The issue normally occurs after an interrupted update using pacman -Syu, which then causes the system to be unable to boot after the next restart (showing only “boot to firmware interface” in the boot menu).

Steps to fix

1) Boot with an EndeavourOS live USB stick

You will need a live/bootable USB key with EndeavourOS installed on it. The EndeavourOS website lists a number of ways to do this [1] .

Then, boot the computer from this live USB stick. This normally involves a process similar to:

  1. Turning off the computer
  2. Plugging in the USB stick
  3. Turning on computer, then repeatedly pressing the ESC key, until a boot menu shows up
  4. Navigate to select the boot device in the boot menu, then select the option to boot from the live USB

This should drop you into a working EndeavourOS operating system, from which you can run the steps to fix the broken one on the computer. All the next steps are commands to run in a terminal, which can be opened with ctrl+alt+t.

Additionally, you should connect to a WiFi network on the live boot, as this makes copy-pasting commands from the internet easier 😅, and allows downloading/completing updates to the broken boot device.

2) Decrypt and mount the encrypted and boot disk partitions

First, identify your boot and encrypted partitions [2] :

1lsblk -f

This will list the available devices, from which you need to identify your boot and encrypted partitions. For my particular laptop:

Next, use cryptsetup to decrypt the LUKS encrypted drive [3] :

1sudo cryptsetup open /dev/mapper/nvme0n1p2 luks_root

Then, mount the newly decrypted partition and then the boot drive into the /boot/ folder within it [4] :

1sudo mount /dev/mapper/luks_root /mnt
2sudo mount /dev/nvme0n1p1 /mnt/boot

3) Root into the broken system

Before this step, it is helpful to have connected to the WiFi on the live boot, as you would on any Linux computer [5] .

Next, use arch-chroot to root into the newly mounted broken system [6] :

1arch-chroot /mnt

4) Debugging WiFi inside arch-chroot

You can check whether WiFi is working inside arch-chroot using the ping command:

1ping google.com

If the WiFi doesn’t work inside arch-chroot on the broken device, first check if it is working on the live boot. If it isn’t, fix it there, then exit and rerun arch-chroot.

If it still isn’t working, the next most likely cause it DNS settings haven’t been copied over. To fix this, exit the arch-chroot to unlock the resolv.conf file, add DNS settings, then rerun arch-chroot [7] :

1exit
2echo "nameserver 8.8.8.8" >> /mnt/etc/resolv.conf
3arch-chroot /mnt

5) Try to repair the broken system

The common issues I have found across two failures are as follows:

These can be resolved as follows (inside arch-chroot on the broken device):

1sudo rm /var/lib/pacman/db.lck
2sudo pacman -Syu
3sudo pacman -Syu linux-lts linux-lts-headers
4grub install --target=x86_54-efi --efi-directory=/boot/efi --bootloader-id=GRUB
5grub-mkconfig -o /boot/grub/grub.cfg

It is possible something else is wrong, but this time is when you should largely be running commands to fix it!

Then, disconnect from the arch-chroot as follows:

1exit

6) Clean up and try to boot

Before restarting, it is good practice to unmount both the boot and decrypted partitions, then close the decrypted partition [10] .

1sudo umount /mnt/boot/
2sudo umount /mnt
3sudo cryptsetup close luks_root

Finally, restart the computer, and hope that it boots correctly!

1reboot

References