UEFI一次性加载启动选项程序实现

UEFI one-time load boot option program implementation

EasyUEFI 等实用程序如何以编程方式(UEFI structs/attributes 需要从 BootOrderList 更改)实现 "one-time" 启动功能?我一直在阅读官方 UEFI 规范,但似乎无法从那里找到答案。

特点是(假设我通常使用Windows):

  1. 我可以选择启动一次,假设我的 U 盘包含 Linux 实时映像。
  2. 重新启动时,我的机器启动到 Linux USB。
  3. 当我关闭 Linux Live USB 并再次启动电脑时,它会重新启动到 Windows。

经典地,一如既往,我在进一步搜索规范 5 分钟后找到了答案:

Otherwise, the boot manager is also required to initiate a boot of the boot option specified by the BootNext variable as the first boot option on the next boot, and only on the next boot. The boot manager removes the BootNext variable before transferring control to the BootNext boot option. After the BootNext boot option is tried, the normal BootOrder list is used. To prevent loops, the boot manager deletes BootNext before transferring control to the preselected boot option.

如规范所述,使用一次的选项应放入 BootNext 列表