UEFI stores boot entries as individual NVRAM variables namedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Rikitav/Unified.Firmware/llms.txt
Use this file to discover all available pages before exploring further.
Boot0000 through BootFFFF. Each one encodes a human-readable description, a packed device path list that tells the firmware where to find the boot image, optional binary data passed to the loaded image, and attribute flags. A separate variable — BootOrder — holds the priority-ordered array of indices the firmware walks when deciding what to boot. FirmwareBootService is the static class that lets you read and manipulate all of this from managed C# code.
Boot Order Properties
LoadOrder
Gets or sets the full
BootOrder NVRAM variable as a BootOptionIndex[]. Changing this array rewrites the variable immediately.CurrentLoadOptionIndex
Returns the
BootOptionIndex of the entry that launched the running OS (backed by BootCurrent). Read-only.NextLoadOptionIndex
Set-only. Writes to
BootNext, which overrides the boot order for exactly one reboot, then is cleared by the firmware.CRUD Operations
Reading a Single Entry
ReadLoadOption deserializes the Boot#### variable into a FirmwareBootOption. Use the generic overload when you have a custom LoadOptionBase subclass. Use ReadRawLoadOption when you need the native EFI_LOAD_OPTION struct without any managed interpretation.
Enumerating All Entries
BootOrder in order and yields a deserialized FirmwareBootOption for each entry. The sequence respects the current boot priority order.
Creating a New Entry
BootOrder for the first unused index (starting at Boot0000), writes the serialized option to that slot, appends or prepends the index in BootOrder, and returns the newly assigned BootOptionIndex. Pass addFirst: true to make it the highest-priority entry.
Updating an Existing Entry
loadOption and overwrites the Boot#### variable at bootOptionIndex. The boot order is not changed.
Editing with a Callback
FirmwareBootOption; mutate it and EditLoadOption writes it back automatically.
Deleting an Entry
Boot#### variable (erasing it from NVRAM) and removes the index from BootOrder.
FirmwareBootOption Model
FirmwareBootOption is the concrete LoadOptionBase implementation used for all standard boot entries.
| Property | Type | Description |
|---|---|---|
Attributes | LoadOptionAttributes | Flags controlling entry visibility and category (ACTIVE, HIDDEN, CATEGORY_BOOT, …) |
Description | string | Human-readable label shown in the firmware boot menu |
Protocols | DevicePathProtocolBase[] | Packed device path sequence that locates the boot image |
OptionalData | byte[] | Arbitrary binary data passed to the loaded EFI image as load options |
BootOptionIndex
BootOptionIndex is a thin ushort wrapper that formats as the canonical Boot#### variable name (zero-padded, upper-case hex). It is implicitly convertible from and to ushort.
Check availability
Call
FirmwareInterface.Available before any boot service operation to confirm the system was started in UEFI mode.Read current entries
Use
EnumerateBootOptions() or ReadLoadOption() to inspect what is already in NVRAM.