Flashing BIOS from Linux

This article provides information on using Linux to update the BIOS of a system. Usually, the update program provided by a manufacturer must be executed under Windows. However, various utilities and methods have been published for upgrading a system BIOS under Linux.
Warning
Flashing the BIOS is a dangerous activity that may render your motherboard inoperable!
Note
HP users may download Windows BIOS updater from HP website, extract *.exe file and locate ISO image for burning to a CD. Using CD, upgrade is possible from BIOS menu using 'Firmware Upgrade' without using below tools. See
this
thread for details. Also, see the
#HP
section below to upgrade using an USB if your current HP BIOS allows it.
For users with Dell computers, Dell recommends Linux users flash their BIOS following information located
here
(in short, put the .EXE on a USB stick and use the F12 boot menu to access the firmware's flash utility).
In addition to the tools described below, many
laptop
pages include individualized instructions for a particular model. The instructions sometimes involve bespoke utilities that may even be particular to the upgrade process on a single model. If there is no page for a particular model, it may be useful to look at pages for similar models, as it might be possible to adapt a process for the target model. The
HP ENVY m4-1015dx
page, for example, includes instructions that may work on a variety of HP models.
fwupd
fwupd is a simple daemon to allow session software to update device firmware on your local machine.
Large vendors including Dell and Logitech use this way to distribute firmware updates to Linux.
fwupd only supports flashing BIOS updates in UEFI mode.
See
fwupd
for further information about installation and usage.
BiosDisk
BiosDisk
simplifies the process of flashing your system BIOS under Linux.
Note
This is only supported on systems when booted in "Legacy mode". In UEFI mode, you will need to use a different method.
Installation
Install
the
biosdisk-git
AUR
package.
Usage
To use the biosdisk utility to create a BIOS flash image, first download the latest raw BIOS image for your system from your manufacturer's website. Make sure, however, that you always get the BIOS executable and NOT the Windows executable. You then have one of two options: create a ISO or install the image for your
boot loader
.
The mkimage action will create a ISO image on the user's hard drive. Usage is the following:
# biosdisk mkimage [-o option] [-i destination] /path/to/.exe
The install action will create the biosdisk image, copy the image file to /boot, and then update the boot loader with an entry for the image. Then all the user has to do is boot the system and select the image to flash the BIOS; this will load the biosdisk image directly from the hard drive and flash the BIOS.
# biosdisk install [-o option] [--name=] /path/to/.exe
Flashrom or Flashprog
Flashrom
/
Flashprog
is a utility for identifying, reading, writing, verifying and erasing flash chips. It is designed to flash BIOS/EFI/coreboot/firmware/optionROM images on mainboards, network/graphics/storage controller cards, and various programmer devices. Flashprog is a fork of Flashrom
[1]
, commands should mostly work on both.
Warning
If you have a laptop/notebook/netbook, please do NOT try flashrom because interactions with the EC on these machines might crash your machine during flashing. flashrom tries to detect if a machine is a laptop, but not all laptops follow the standard, so this is not 100% reliable.
[2]
Installation
Install
the
flashrom
/
flashprog
package.
Usage
Find out if your motherboard and chipset (internal) is listed in
flashrom Supported Hardware
or
flashprog Supported hardware
)
You can also find out if your hardware is supported by issuing the following command
# flashrom --programmer internal
The above command will tell you your motherboard and chipset. You can then find out if yours is supported by issuing this command:
# flashrom --programmer internal -L | grep CHIPNAMEfrompreviouscommand
On modern mainboards you probably get more than one rom chip listed. You have to select the chipname you get from the upper command. Then you use the
-c
option to select which rom is affected by the command
# flashrom --programmer internal -c "CHIPNAME" -r backup_CHIPNAME.bin
Write and verify the new BIOS image (proprietary or Coreboot) on the ROM chip:
# flashrom --programmer internal -c "CHIPNAME" -w newbios.bin
If you want to flash other flash chips on your mainboard, you will find all options with
# flashrom
Note
With Linux kernel versions greater than 4.4,
CONFIG_IO_STRICT_DEVMEM
a new kernel security measure can make flashrom stop working; in that case, you can try adding
iomem=relaxed
to your kernel parameters.
FAQ
.
FreeDOS
Some laptop manufacturers provide a DOS compatible executable to flash the system firmware.
FreeDOS
, a free DOS-compatible operating system, is up to the challenge, no need for proprietary DOS versions. So, all you need is a bootable floppy disk image with FreeDOS kernel on it.
Unetbootin
By far the easiest way to make a bootable FreeDOS USB Stick is using
unetbootin
AUR
.
You should format a pendrive with FAT16 and flag it as "boot" (you may do this through a GUI with
gparted
or
partitionmanager
). Then, after mounting the flash drive, select under distribution
FreeDOS
and your mounted stick. The app will automatically download the image for you and copy it to the drive. Finally, you may copy everything you want to flash there (BIOS, firmwares, etc).
Warning
Unetbootin may not function properly on some Lenovo systems. It may be necessary to create the bootable stick on a different device. See
here
.
dosemu
The problem with the official FreeDOS images is the lack of extra space for holding firmware and BIOS update files and programs. The easiest way to create a DOS, bootable FAT drive of arbitrary size under Linux is to
mount a FAT drive under dosemu and then make it bootable with the FreeDOS sys command
.
For an alternative method, see
Gentoo:BIOS Update#FreeDOS environment
.
Pre-built images
Yet another simple solution:
FreeDOS pre-built bootable USB flash drive image by Christian Taube
. Instructions can be found
here
.
Using a FreeDOS-provided Disk Image + USB stick on Linux
As of writing (2017-07-11),
unetbootin
AUR
does not support versions of FreeDOS more recent than 1.0 (current version is 1.2). The following procedure worked to upgrade an Inspiron 17-3737 to the A09 BIOS. (Dell offers this as a possibility
on their site
)
Some notes before starting:
You can check your current BIOS version with
dmidecode
. You might already be at the latest version.
Ensure that your hardware vendor has verified this method works (use of FreeDOS to run BIOS update
.exe
)
Laptop users should not attempt this without AC power
This is dangerous, and you assume all risk for following this procedure.
Procedure:
Grab the latest USB installer from the
FreeDOS Download Page
author note: used the "Full" version on suspicion that it might include more drivers, etc (pure speculation)
Extract the archive, you get a
.img
file
Determine which of
/dev/sdX
is your USB stick (use
fdisk -l
)
Write the image directly to the block device:
dd if=FD12FULL.img of=/dev/sdX status=progress
(where
X
is the letter representing your USB stick as a block device, do not write the image to a partition)
Double-check that the image copying worked:
fdisk -l
(you should see a single partition on a DOS disk with the bootable ("boot") flag set)
Mount the partition, and copy over the
.exe
used to update your firmware
Stay on the safe side and limit the filename to 8 characters (without extension), uppercase
Ensure that you verified any checksums provided by your hardware vendor
Unmount and reboot. Do whatever is needed to boot from the USB drive
Now you will find yourself in the FreeDOS live installation environment.
Select your language
You will be prompted to install FreeDOS
Select "No - Return to DOS"
You should see a prompt (
C:\>
)
Run
dir /w
and verify that your firmware upgrade tool is present
Run the executable
author note: in the case of the Dell tool, the machine displayed a splash screen and then rebooted. Upon reboot, it started the firmware upgrade automatically, and ran for about 2 minutes with the fan at full speed)
Once the process specific to your vendor completes, optionally verify through the BIOS setup screen, as well as by running
dmidecode
when you are back in Linux
Using a FreeDOS-provided Disk Image + USB stick with Windows
The author for this procedure encountered several issues related to mounting the FAT partition type of the USB using the previous method on Linux with dd. This procedure seeks to outline a method to flash the BIOS with FreeDOS, a USB stick and Ruckus on Windows.
Prerequisites:
Download and install Rufus for Windows. This can be either the full installation or the portable version.
Download the latest Full USB installer for FreeDOS (v1.2 as of the time of writing).
Download the latest BIOS update from the vendors' website
It is assumed that
dmidecode
is installed on the system
Procedure:
Extract the contents of the
FD12FULL.zip
archive, noting the
.img
file
Insert a flash drive and flash the
FD12FULL.img
file using Rufus, leaving all default options
Detailed use of Rufus is not covered in this guide. Refer to Rufus' manual or documentation for detailed usage
Once flashed with Rufus, rename the BIOS file with 8 uppercase characters (not including the extension) and copy it over to the flash drive
Eject the flash drive and plug it into the laptop.
Perform whatever steps are necessary to boot from the USB with LEGACY BOOT
Author note: For my Dell Laptop, I press F12 for boot options and select 'USB Storage Device' under 'Legacy Options'. I have explicitly enabled legacy boot from within my BIOS, but this option may not be present if the system is only configured to boot with UEFI
You will be presented with the FreeDOS Installation environment
Select preferred language
Select 'No - Return to DOS' on the next screen
Type
dir
to view the contents of the USB flash drive
To execute the BIOS upgrade file, simply type the filename and press enter
Note: My upgrade took <2 minutes with the fans at full speed. The system reboot 3 times total.
Once the upgrade completes and the system boots back into the OS, issue
dmidecode | grep -E 'BIOS|Version'
as root and validate the BIOS version has been upgraded
Images that are too large for a floppy
If your flash image is too large for a floppy, go to the
FreeDos bootdisk website
, and download the 10Mb hard-disk image.  This image is a full disk image, including partitions, so adding your flash utility will be a little trickier:
First find the first partition (at time of writing, the first partition starts at block 63; this means that the partitions starts at offset
512 * 63 = 32256
).
You can either use:
# file -sk
<image-file>
| sed -r 's/.*startsector ([0-9]+).*/\1/'
63
Or:
# fdisk -l
<image-file>
…
Units = sectors of 1 *
512
= 512 bytes
…
      Device  Boot  Start    End  Blocks  Id  System
              *
63
19151   9544+   1  FAT12
Now you can mount the image:
# mount -oloop,offset=$((63 * 512))
<image-file>
/mnt
Then you can copy your flash utility onto the filesystem as normal.
Once you are done:
# umount /mnt
The image can now be copied to a USB stick for booting, or booted as a memdisk as per normal instructions.
Usage
The OEM Bootdisk version is recommended, as it only includes
kernel
and
command.com
thus leaving more space for the flash utility and new BIOS image. Download the
FreeDOS image
and
decompress
it.
Copy your BIOS flash utility and new BIOS image to the mounted floppy disk image. Load the necessary modules:
# modprobe -a vfat loop
/proc/fileystems
shows if the needed file systems are supported. "loop mount" the floppy disk image to a temporary path:
$ mount --mkdir -t vfat -o loop FDOEM.144 /tmp/floppy
If the mount went without errors, copy the BIOS flash utility and new BIOS image to the mounted floppy disk image. You will probably have to unzip the archive you downloaded from your motherboard vendor site, to get to those two files. For example:
# unzip 775Dual-VSTA\(2.60\).zip
Archive: 775Dual-VSTA(2.60).zip
 inflating: 75DVSTA2.60
 inflating: ASRflash.exe
# cp 75DVSTA2.60 ASRflash.exe /tmp/floppy
Check that the two files were not too big for the floppy:
$ df /tmp/floppy
Filesystem           1K-blocks      Used Available Use% Mounted on
/tmp/FDOEM.144            1424       990       434  70% /tmp/floppy
Unmount the floppy disk image:
# umount /tmp/floppy
The next step is to burn the floppy image to a CD/DVD-RW media, but in a way that it can be booted afterwards. First create a bootable CD image, and then burn it.
# genisoimage -o bootcd.iso -b FDOEM.144 FDOEM.144
# wodim -v bootcd.iso
You may alternatively add your image to the
GRUB
menu. Install
syslinux
and copy
memdisk
and your image to
/boot
:
# cp /usr/lib/syslinux/memdisk /boot
# cp FDOEM.144 /boot/flashbios.img
Now add an entry to
/boot/grub/menu.lst
:
/boot/grub/menu.lst
title Flash BIOS
kernel /memdisk
initrd /flashbios.img
Or for GRUB2 in
/boot/grub/grub.cfg
:
/boot/grub/grub.cfg
menuentry "Flash BIOS" {
 linux16 /boot/memdisk
 initrd16 /boot/flashbios.img
}
Or for syslinux in
/boot/syslinux/syslinux.cfg
:
/boot/syslinux/syslinux.cfg
LABEL flashbios
	MENU LABEL Flash BIOS
	LINUX ../memdisk
	INITRD ../fdboot.img
Finally reboot your machine, making sure the CD drive is first in the boot sequence, and run the BIOS upgrade procedure when the CD boots. If using the GRUB method, choose the new entry on the list, and it should boot into FreeDOS.
Bootable optical disk emulation
The script Geteltorito.pl will extract the
El Torito
boot image. It has worked with Lenovo laptops like the X1 Carbon, X200, X220, X230, X260, X395, W540, T450, T450s and P50. It may work for other vendors as well.
Installation
Install the
geteltorito
AUR
package.
Usage
Get the bios update iso from the vendor support site. Run the
geteltorito
image extraction:
$ geteltorito.pl -o <image>.img <image>.iso
Copy the image to an
USB flash installation medium
:
# dd if=<image>.img of=<destination> bs=512K
Reboot and boot from the USB drive, follow vendor directions.
Note
If you get the message "Secure Flash Authentication failed!", it means that some security check did not allow the flash to happen. It can help to go to the BIOS options page
Security > UEFI BIOS Update Option
and disable
Secure RollBack Prevention
and enable
Flash BIOS Updating by End-Users
. You can set them to what you want after flashing.
Windows PE
If your manufacturer only provides an exe file and you were not successful following the prior advice, you can update your bios creating a Windows PE flash drive and from there flash the bios update as normally.
Usage
Download a ISO
Windows PE
to create a bootable drive.
Boot the USB and go to your manufacturer website and download the respective update, and execute normally.
Note
This method was tested on an Acer Laptop, your mileage may vary
Vendor specific
HP
Warning
Not all HP BIOSes are the same. A method that may work in one of their models may or may not work in another model. For example, neither of the below methods work with the HP T730 Thin Client.
Some HP BIOS, especially the ones available in their business lines (e.g., ProDesk, EliteDesk, and Thin Clients like the T620), provide a firmware upgrade option through both the Startup Menu and the F10 Setup utility.
The correct directory structure for the USB drive is model-specific. To determine the exact requirements for your model:
Download the BIOS executable from HP's support website using your serial number (selecting Windows as the OS).
Extract the downloaded executable using, e.g.,
7-Zip
.
Among the extracted files, open the `Bios Flash.htm` file in a web browser.
Look for a section titled "Updating from Computer Setup (F10)" or "Startup Menu / F10 Setup Firmware Update". This section will specify the exact folder structure and file naming convention needed for your specific model.
For newer models like the OmniBook, the required procedure is as follows:
The extracted BIOS file (often a `.bin` file) **must be renamed to `firmware.bin`**.
This file must be placed on a FAT32 formatted USB drive in one of these two specific folders (try the first one first):
*   `\HP\DEVFW\`
   *   `\EFI\HP\DEVFW\`
The full path on the USB drive will therefore be either `\HP\DEVFW\firmware.bin` or `\EFI\HP\DEVFW\firmware.bin`.
If you cannot find the documentation within the `Bios Flash.htm` file, the following alternative directory structures are also common for other HP models:
1.  Placing the BIOS `*.bin` file (keeping its original name) in the root of the USB drive.
2.  Using a directory structure like `/HP/BIOS/Newest/` with the original `.bin` file.
Procedure:
Follow the steps above to download and extract the BIOS files. Determine the required directory structure and filename from the `Bios Flash.htm` file. For Business Desktops, rename the file to `firmware.bin` and place it in the `\HP\DEVFW\` folder on your USB drive.
Create the appropriate directory structure on a FAT32 formatted USB drive and copy the necessary file.
Unmount the USB drive.
Attach it to the computer whose BIOS needs to be upgraded.
Reboot the computer and press
Esc
to display the Startup Menu.
From the Startup Menu, you can either:
## Select **"Update System and Supported Device Firmware"** directly for an immediate update, or
   ## Select **"BIOS Setup (F10)"** (or press
F10
), navigate to the "Update System BIOS" menu, and select **"Update System and Supported Device Firmware Using Local Media"**.
The utility will search the attached media for the firmware file. If found, it will display the current and new version information.
Follow the on-screen prompts to complete the upgrade. The system will restart afterwards to finalize the update.
Note
If a BIOS administrator password has been set, it will be required to access the update utility.
If the update fails with an error like "ROM is incompatible with the system", double-check that you are using the correct folder structure and filename specified for your model. Trying the alternative structure (`\EFI\HP\DEVFW\` or the root of the drive) is a common troubleshooting step.
For some older models (particularly from 2010-2014), unpacking the executable produces a file ending in
.fd
that contains both the BIOS and a signature. This file must be extracted into a `.bin` and a `.sig` or `.s12` file. These files then need to be placed on the USB drive in the correct structure. The
HP ENVY m4-1015dx
page provides specific details for one such model.
If no method seems to work, then either use the FreeDOS method (if HP provides DOS executables) or use a Windows machine to create an HP BIOS Flash Recovery USB.
ASUS
Modern ASUS motherboards do not require Windows for firmware update. You can update from within the UEFI with the Ez-Flash utility. However, they
ask
you to update ME before updating bios. The problem is that they do not include Linux update tool in the archive
[3]
.
Even if your bios is at latest version, you need update ME anyway. It is important to avoid hardware problems, such as unable to wake from sleep.
Download the System Tools from
here
. For this particular motherboard the latest (v15) version did not work (Unknown PCH platform). As recommended
here
, using v11 version worked. Extract the Linux executable from the archive ("CSME System Tools v11 r46/FWUpdate/LINUX64/FWUpdLcl") and place it to the folder with the firmware in archive downloaded from Asus site (MEUpdateTool_11.8.80.3746v5_S/FW/). Make the "FWUpdLcl" executable.
Show usage:
$ ./FWUpdLcl
Intel (R) Firmware Update Utility Version: 11.8.92.4222
Copyright (C) 2007 - 2022, Intel Corporation.  All rights reserved.

FWUpdLcl.exe [-H|?] [-VER] [-EXP] [-VERBOSE] [-F] [-Y] [-SAVE] 
             [-FWVER] [-PARTID] [-ALLOWSV] [-FORCERESET] [-OEMID] [-PASS] 
             [-PARTVER] 

-H|?                    Displays help screen. 
-VER                    Displays version information. 
-EXP                    Displays example usage of this tool. 
-VERBOSE<file>          Display the debug information of the tool. 
-F <file>               File used for updating the FW. 
-Y                      Automatically answer Yes to prompts. 
-SAVE <file>            Save the current FW to an update image. 
-FWVER<file>            Display the FW Version of current FW or update image. 
-PARTID<Partition ID>   Provide specific Partition ID to perform partial update. 
-ALLOWSV                Allows same version firmware updates. 
-FORCERESET             Automatically Reboots system after update (if needed). 
-OEMID <UUID>           OEM ID needed to perform firmware update. 
-PASS <pass>            MeBX password. Optional with the '-f' option.  
-PARTVER <Partition ID> Display the Version of specific partition.
Show your current ME version:
# ./FWUpdLcl -FWVER
Intel (R) Firmware Update Utility Version: 11.8.92.4222
Copyright (C) 2007 - 2022, Intel Corporation.  All rights reserved.

FW Version: 11.8.65.3590
Show the ME version of the file in downloaded archive:
$ ./FWUpdLcl -FWVER ME.bin
Intel (R) Firmware Update Utility Version: 11.8.92.4222
Copyright (C) 2007 - 2022, Intel Corporation.  All rights reserved.

FW Version: 11.8.80.3746
Start flashing:
# ./FWUpdLcl -F ME.bin
Intel (R) Firmware Update Utility Version: 11.8.92.4222
Copyright (C) 2007 - 2022, Intel Corporation.  All rights reserved.

Communication Mode: MEI
Checking firmware parameters...

Warning: Do not exit the process or power off the machine before the firmware update process ends.
Sending the update image to FW for verification:  [ COMPLETE ] 

FW Update:  [ 100% (/)]Do not Interrupt
FW Update is completed successfully.
To be able to see new version you need reboot. Now you can see the version applied:
# ./FWUpdLcl -FWVER
Intel (R) Firmware Update Utility Version: 11.8.92.4222
Copyright (C) 2007 - 2022, Intel Corporation.  All rights reserved.

FW Version: 11.8.80.3746
Note
Alternatively, you can update via the UEFI shell using
FWUpdLcl.efi
from the archive.
Lenovo
Some firmware updates are only provided in Windows executable format. This section uses as an example the Lenovo IdeaPad L340-15API firmware. If you try to apply these steps to another system, your mileage may vary. The Lenovo IdeaPad L340-15API only offers a
.exe
on the Lenovo support site. This renders not just many, but all of the methods in the article futile:
Wine: while dangerous, the mentioned IdeaPad firmware failed due to a "TDK library" error. More on this below.
fwupd
alone does not work because the firmware is not on the LVFS, even if other entries might be, such as the
Secure Boot
Forbidden Signatures Database (dbx).
BiosDisk only works on "BIOS executables" and not our executable. It is also made by Dell, so your mileage could vary with other vendors.
Flashrom comes with the specific warning not to use it with laptops. Many systems, and the IdeaPad included, are not supported in their hardware list either.
For FreeDOS to work, the firmware would need to be a DOS executable. If your firmware executable is like that of the IdeaPad discussed, it will not run in FreeDOS at all even with modern Windows executables starting with a DOS header.
geteltorito.pl
only works if you have an ISO.
Windows PE, might also yield incompatibility issues. In particular, the installer might not run because it is checking the operating system for compatibility.
The installer. The IdeaPad's firmware download comes in an installer format, specifically
set up by Inno Setup
. Instead of extracting by running the installer with something like Wine, use the
innoextract
tool:
$ innoextract
installer.exe
We find inside another executable. This inner IdeaPad executable also does not work in FreeDOS or Windows PE. However, note the earlier mentioned TDK library error. TDK refers to the firmware dev kit made by
Phoenix Technologies
[
dead link
2025-11-16—SSL error]
. It was mentioned on the
badcaps forum
that the executable itself will extract the contents using the
/ext
argument. So using Wine, run
$ wine
firmware.exe
/ext
Alternatively, using
7-Zip
has been reported as working too:
$ 7z x
firmware.exe
We find ourselves with more
.exe
files in this
.exe
file too. None of them work in FreeDOS or Windows PE. However, note that the firmware itself is in a UEFI capsule update format, suggested in
bladecoder's blog
.
In the extracted files, look for the
.cap
file. You have located the extracted firmware.
Alternatively, some models use an
.fd
file.
With the UEFI capsule in hand, the next step is to try to install it manually. Mentioned in that blog,
fwupd
can help with this.
fwupdate
is not provided in the
fwupd
package, but
fwupdtool
accomplishes the same task. First, identify the device ID of the firmware (
Device ID
under
System Firmware
):
# fwupdtool get-devices
Finding the ID in the devices output, use it with a manual install:
# fwupdtool install-blob
BIOS.ext
DEVICE-ID
Reboot when prompted. The screen may go completely black: wait for it to finish installing.
The UEFI boot entries in NVRAM are cleared after the update. The
boot loader
files in the EFI system are not touched, so you simply need to recreate your previous UEFI boot entries. First, update your UEFI settings to your previous ones.
Finally, boot an external boot media and either reinstall your boot loader or use
efibootmgr
to recreate the UEFI boot entry for your boot loader.
Acer
Acer firmware updates are very analogous to
#Lenovo
ones in that the only downloads available are Windows executable files and that the firmware updates are not available on the LVFS either. However, the update image can be extracted from these files and installed using
fwupdtool
just as well:
Find the drivers download page by pasting your device model or serial number on this page:
https://www.acer.com/us-en/support/drivers-and-manuals
Expand
BIOS/Firmware
section and download the ZIP file for the latest version, in our example
BIOS_Acer_1.08_A_A.zip
Unpack it:
# unzip BIOS_Acer_1.08_A_A.zip
Inside of it, you will find an .exe file such as
JH4SH108.exe
, we will extract it using
7zip
:
# 7z x JH4SH108.exe -oOutputDir
In the unpacked folder
OutputDir
, we should find
abobios.bin
– this is the UEFI capsule to install
Then, identify the device ID of the firmware (
Device ID
under
System Firmware
):
# fwupdtool get-devices
Finding the ID in the devices output, use it with a manual install:
# fwupdtool install-blob
abobios.bin
DEVICE-ID
Reboot when prompted. You should see a screen with flashing progress of the
Insyde H2OFFT (Flash Firmware Tool)
tool. Verify that the
BIOS Model Name
of old and new BIOS exactly matches up (in this example's case,
JH4SH
, with new BIOS version
V1.08
)
The UEFI boot order in the NVRAM is cleared after the update (aside from
Windows Boot Manager
, if it was installed). The
boot loader
files in the EFI system and the boot entries in the NVRAM are not touched, so you simply need to change the boot order list to match what you had before.
Finally, boot an external boot media and either reinstall your boot loader or use
efibootmgr
to set the boot order and place your boot loader entry as the first one to boot.