Published on

Restoring an Arch Linux UEFI Boot Entry with GRUB

After updating the BIOS firmware on my MSI motherboard, the machine lost its boot records and my Arch Linux installation no longer booted. I tried a few recovery paths before getting the system working again. This runbook captures the successful sequence so the recovery steps are easier to follow next time.

These steps apply to an Arch Linux system that boots with GRUB on UEFI firmware.

1. Disable Secure Boot

Enter the UEFI firmware settings and set Secure Boot to disabled or insecure mode. This avoids firmware-level boot restrictions while reinstalling the GRUB UEFI boot entry.

2. Boot from an Arch Linux Live USB

Boot the machine from an Arch Linux live USB so the installed system can be mounted and repaired.

3. Mount the Installed System

Mount the root partition under /mnt, mount the EFI system partition in the same place it is normally mounted on the installed system, and enable swap.

mount /dev/nvme0n1p3 /mnt

# If your boot was mounted at /boot/EFI/
mount /dev/nvme0n1p1 /mnt/boot/EFI

# If your boot was mounted at /boot (Mine was)
mount /dev/nvme0n1p1 /mnt/boot
swapon /dev/nvme0n1p2

In my case, the EFI system partition was mounted at /boot, so the /mnt/boot command was the relevant one.

4. Reinstall GRUB

Because this system uses the GRUB bootloader, the next step was to reinstall GRUB for a 64-bit UEFI target.

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB

5. Regenerate the GRUB Configuration

After reinstalling GRUB, regenerate the GRUB configuration file.

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

6. Check the UEFI Boot Entry

Use efibootmgr to confirm that the firmware has a GRUB boot entry.

efibootmgr -v

The output should include an entry similar to this:

Boot0001* GRUB HD(...) File(\EFI\GRUB\grubx64.efi)

If the GRUB entry exists but is not first in the boot order, move it to the front. Replace 0001 with the actual GRUB boot number shown by efibootmgr.

# Replace 0001 with the actual GRUB boot number
efibootmgr -o 0001

7. Add the Removable Fallback Entry

Some motherboards ignore or lose NVRAM boot entries after BIOS updates. Installing GRUB to the removable-media fallback path can help the firmware find the bootloader even when the normal UEFI entry is missing or ignored.

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB --removable

Summary

The recovery was: disable Secure Boot, boot an Arch live USB, mount the installed root and EFI partitions, reinstall GRUB for UEFI, regenerate grub.cfg, verify the firmware boot entry with efibootmgr, and install the removable fallback entry as extra protection against firmware boot-entry resets.