The boot order is broken after updating the BIOS

I should have made the same settings when I bought the computer, but I forgot how to do it, so make a note.

** This article is just a memo. Those who refer to it are at their own risk. ** **

environment

what's happened

When I rebooted the machine after updating the BIOS, Windows started up instead of Arch Linux.

Solution

  1. Open the boot option from the Windows UEFI settings
  2. Boot Arch Linux and create a new boot entry for Arch Linux from ʻefibootmgr`
  3. Reboot and change the boot order from the boot settings in the BIOS

How to use efibootmgr

Use efibootmgr to set the boot order. The sudo is omitted below, so add it as needed.

Here, the options of efibootmgr are explained using the command (below) typed in my environment as an example.

$ efibootmgr -c -d /dev/sda -p 1 -L "Arch Linux" -l "\EFI\boot\bootx64.efi"

See the Gentoo wiki for more information.

-c: Create boot entry

Create a new boot entry.

-d: disk

Enter the name of the disk where Linux is installed. You can check it with lsblk etc. In my environment, Windows is installed in / dev / nvme0n1 and Arch Linux is installed in / dev / sda, so I chose -d / dev / sda.

-p: EFI system partition (ESP) number

You can check it with fdisk -l, parted -l, etc. It was 1 in my environment, so I chose -p 1.

-L: name of boot entry

Give it a nice name.

-l: efi file path

Enter the path of the efi file specified when creating the configuration file for the boot loader such as grub. However, ** use \ instead of / ** for the path.

In my environment, the efi file was in / boot / EFI / boot / bootx64.efi, so change/in the path under / boot to \ and -l" \ EFI I made it \ boot \ bootx64.efi ".

Change the order from the boot settings in the BIOS

In my environment, when I restarted my computer, the boot order set by ʻefibootmgr` was reset. However, the boot entry itself was created correctly, so I was able to change the boot order from the BIOS settings.

If the boot entry itself cannot be found, the above-mentioned setting of the value of -l may be incorrect. Check if the boot entry was created correctly with ʻefibootmgr -v`.

Finally

If you find something wrong, please let us know in the comments. See you soon.

Recommended Posts

The boot order is broken after updating the BIOS
Solution: The jedi-vim pop-up display is broken
Is the network after VGG really progressing? The story