How UEFI boot options are structured

A practical overview of UEFI boot option architecture: Boot####, BootOrder, BootNext, BootCurrent, EFI_LOAD_OPTION, BDS flow, and debugging.

Updated 4 min read
Đọc bằng English Tiếng Việt 日本語
Boot / UEFI Boot Manager cover

UEFI boot option architecture is the way firmware represents, stores, and selects boot targets. It is built around UEFI variables such as Boot####, BootOrder, BootNext, and BootCurrent, plus the EFI_LOAD_OPTION payload stored inside each Boot#### entry.

If you learn each variable in isolation, the model feels fragmented. During debugging, you need the architecture: who creates the boot option, who orders it, who parses the device path, who calls LoadImage(), and which policy changes the order after a failure.

The overall picture

UEFI Boot Option Architecture

UEFI Variable Store
├─ BootOrder
│  └─ UINT16 list: 0001, 0003, 0007...
├─ BootNext
│  └─ One-time UINT16 option
├─ BootCurrent
│  └─ Current booted option
├─ Boot0001
│  └─ EFI_LOAD_OPTION
├─ Boot0003
│  └─ EFI_LOAD_OPTION
└─ Boot0007
   └─ EFI_LOAD_OPTION

BootOrder is only a reference list. Boot#### stores the description, attributes, device path, and optional data. BootNext is a one-time override. BootCurrent records what the firmware actually used.

Role of each part

Main components
Component Role Typical bug
Boot#### Describes one concrete boot option Stale device path, inactive option, duplicate entry
BootOrder Defines the order of boot attempts References missing entries or is rewritten by policy
BootNext One-time next boot option Not cleared or unexpectedly overrides BootOrder
BootCurrent Records the option used for this boot Missing or wrong value makes debugging harder
EFI_LOAD_OPTION Data format inside Boot#### Bad parser offset or FilePathListLength
Device Path Path to a loader or device LoadImage fails or the wrong disk boots

How BDS consumes boot options

01 Policy

Platform policy

Decide boot mode, hotkeys, recovery, and fast boot.

02 Next

Check BootNext

Use a one-time boot target if present.

03 Order

Read BootOrder

Get the list of boot option numbers.

04 Option

Read Boot####

Parse the matching EFI_LOAD_OPTION.

05 Path

Resolve Device Path

Find the device, filesystem, and EFI file.

06 Run

LoadImage/StartImage

Load and run the bootloader.

How boot options are consumed in BDS.

Some boot failures look like OS loader problems, but the firmware may never reach the loader because device path resolution or LoadImage() failed first.

Who creates Boot####?

Boot options may be created by several producers:

  • firmware when it discovers an OS loader
  • BIOS Setup UI when the user adds an option
  • an OS installer
  • OS tools such as efibootmgr or Windows boot management tools
  • recovery flow or firmware update logic
  • platform policy that creates fallback entries

Because there are many producers, boot options can easily become duplicated, stale, or inconsistent with the UI.

Boot option lifecycle

A boot option usually moves through this lifecycle:

Create -> Add to BootOrder -> Try -> Success/Fail -> Keep/Reorder/Delete/Disable

Real variants include:

  • The option is created but never added to BootOrder.
  • The option is in BootOrder but inactive.
  • Firmware moves a repeatedly failing option toward the end.
  • The option still points to an old disk after cloning or SSD replacement.
  • An OS update creates a new entry but does not remove the old one.
  • A firmware update preserves NVRAM and therefore preserves old errors too.

Real debug case: boot option leak

A boot option leak happens when the system keeps creating new boot options without cleaning old ones. Over time, the variable store fills up or the boot menu becomes full of duplicate-looking entries.

Symptoms include:

  • Boot0001, Boot0004, and Boot0008 share the same description.
  • BootOrder becomes unusually long.
  • BIOS Setup shows many similar entries.
  • SetVariable() starts returning EFI_OUT_OF_RESOURCES.
  • dbx update or BIOS Setup save fails because space is low.

Debug direction:

  1. Dump all Boot#### entries.
  2. Compare description and full device path.
  3. Check which entries are referenced by BootOrder.
  4. Find the producer that creates new entries.
  5. Check variable store reclaim.
  6. Do not blindly delete Secure Boot variables or Setup variables.

Source-reading checklist

Boot option architecture source-reading checklist

Use this when reading BDS, Boot Manager, or variable code.

Useful logs

BootNext
BootOrder
BootCurrent
All Boot#### names
EFI_LOAD_OPTION attributes
Device Path text
OptionalData size
Producer path if a new option is created
LoadImage status
StartImage status
Variable store free space or quota

Good logs tell you whether the failure is in boot option structure, boot selection policy, or the loader itself.

Found this article useful?

Share it with someone learning firmware, BIOS/UEFI, or embedded systems, or support the author.

Feedback

Nội dung liên quan

Một số bài viết, ghi chú hoặc project có liên quan đến nội dung bạn vừa đọc.

Biến note thành bài viết hoàn chỉnh

Notes là nơi ghi nhanh khái niệm.