bcfg Deep Dive
How to use UEFI Shell bcfg to inspect, add, remove, and debug UEFI boot options from the firmware side.
The OS boot entry is gone, but the disk is still readable from Shell.
You can see the EFI System Partition. You can even launch bootmgfw.efi manually. But BDS no longer lists the option.
That is a bcfg moment.
Basic commands
Shell> bcfg boot dump
Shell> bcfg boot add 0 fs0:\EFI\BOOT\BOOTX64.EFI "USB Recovery"
Shell> bcfg boot rm 0
Different Shell versions may vary slightly, so always check help bcfg on the target platform.
How bcfg relates to NVRAM
User command
Reads or modifies boot entries from UEFI Shell.
EFI_LOAD_OPTION
Stores attributes, description, device path, and optional data.
Boot priority list
Stores the order in which BDS tries Boot#### entries.
Boot Device Selection
Consumes BootOrder and Boot#### variables to choose the boot target.
Real world example: manually recover a boot option
Shell> map -r
Shell> fs0:
FS0:\> ls EFI\Microsoft\Boot
FS0:\> bcfg boot add 0 fs0:\EFI\Microsoft\Boot\bootmgfw.efi "Windows Boot Manager"
FS0:\> bcfg boot dump
This can recover a missing boot entry when the ESP is still intact.
But for root-cause analysis, do not stop there. Ask why the variable disappeared:
NVRAM full?
Variable store corruption?
BIOS update reset policy?
Boot option migration bug?
CMOS clear behavior?
Secure Boot / setup mode side effect?
Common pitfall: adding a path without understanding mapping
Adding a boot option with fs0: works only if the Shell converts it into a stable device path. Always verify the resulting Boot#### with dmpstore or bcfg boot dump.
Debug checklist
Before and after bcfg changes
Avoid making the debug state worse.
Related notes
Found this useful?
Save it or share it with someone learning firmware, BIOS/UEFI, and embedded systems.
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.
Boot Failure Playbook
A firmware engineer playbook for debugging missing boot options, invalid BootOrder, broken Device Paths, and BDS boot failures.
dmpstore Deep Dive
How to use UEFI Shell dmpstore to inspect boot variables, Secure Boot variables, setup variables, and NVRAM state during firmware debug.
What is Boot####, BootOrder, and BootNext?
Quick note explaining Boot####, BootOrder, and BootNext for BIOS/UEFI and embedded firmware readers.
Biến note thành bài viết hoàn chỉnh
Notes là nơi ghi nhanh khái niệm.