Skip to content

Add opt-in UefiTarget boot for Dell virtual CD - #16

Open
sshnaidm wants to merge 2 commits into
masterfrom
dell-uefi-target-virtual-cd
Open

sshnaidm wants to merge 2 commits into
masterfrom
dell-uefi-target-virtual-cd

Conversation

@sshnaidm

@sshnaidm sshnaidm commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Problem

On Dell iDRAC, BootSourceOverrideTarget=Cd can resolve to a stale OS-loader UEFI boot entry on the virtual CD's USB path, for example .../USB(0x1,0x0)/CDROM(0x1)/\EFI\fedora\shimx64.efi, left by an older shim-based ISO. If the ISO now mounted doesn't contain that loader, the BIOS uses up the one-time boot and silently falls back to the disk. boot_from_iso reports success, but the host boots its installed OS.

We hit this on lab hosts where the stale entry sat first in BootOrder. Pointing the override at the exact device path of the "Virtual Optical Drive" boot option (UefiTarget) booted the ISO reliably.

Change

A new opt-in flag, dell_uefi_target (default False), on boot_from_iso and ensure_boot_once. Default behavior is unchanged: plain Cd.

When the flag is enabled:

  • On Dell in UEFI mode, a Cd request becomes UefiTarget with UefiTargetBootSourceOverride set to the Virtual Optical Drive's device path, discovered from BootOptions. OS-loader entries on the same path are ignored.
  • It falls back to Cd (logging a warning) for legacy mode, non-Dell vendors, or when no Virtual Optical Drive boot option exists. Dell only lists that option after a POST with virtual media attached.
  • iDRAC applies the UEFI target through a BIOS configuration job. Until the next POST, the system resource reports a null UefiTargetBootSourceOverride. Idempotency checks and boot_from_iso verification therefore accept either the active value or the pending BIOS OneTimeUefiBootPath. The reset is still withheld if neither matches.
  • It costs one extra reboot cycle for the BIOS job, which is why it's off by default.

Results now include boot_target and uefi_target_path. README and AGENTS docs are updated.

Testing

  • New unit tests:
    • the default stays Cd and never queries BootOptions;
    • with the flag: stale-entry selection, and boot option lookup with and without $expand;
    • legacy mode and the fallback to Cd;
    • no PATCH when the pending BIOS path already matches, and re-patching a wrong target;
    • non-Cd targets skip the lookup;
    • boot_from_iso end-to-end, including blocking the reset when the target is not in effect;
    • the flag is type-checked.
  • Full suite: 411 passed. black -l 120 and flake8 are clean.
  • Manually on Dell R650/R750 (iDRAC 7.10.x): the UEFI target override booted the ISO on two hosts where Cd had fallen back to the disk. The read-only discovery helper returned the correct path on four Dell hosts, including one with a stale CD loader entry. It returned none on a host with no Virtual Optical Drive boot option, which triggers the fallback.

🤖 Generated with Claude Code

sshnaidm and others added 2 commits November 16, 2026 17:26
On Dell iDRAC, BootSourceOverrideTarget=Cd can resolve to a stale
OS-loader boot entry that sits on the virtual CD USB path (for example
".../CDROM(0x1)/\EFI\fedora\shimx64.efi" left by an older shim-based
ISO). If the current ISO does not contain that loader, the BIOS uses up
the one-time boot and silently falls back to the disk.

For Dell hosts in UEFI mode, _ensure_boot_once_single now translates a
Cd request into BootSourceOverrideTarget=UefiTarget with
UefiTargetBootSourceOverride set to the exact "Virtual Optical Drive"
device path discovered from BootOptions. OS-loader entries on the same
path are ignored. It falls back to Cd for legacy mode, non-Dell vendors,
or when the boot option cannot be found.

iDRAC applies the UEFI target through a BIOS job, so until the next POST
the system resource reports a null path. Idempotency checks and
boot_from_iso verification therefore accept either the active
UefiTargetBootSourceOverride or the pending BIOS OneTimeUefiBootPath,
and the reset is still withheld if neither matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plain Cd boot override works on most Dell hosts, and UefiTarget adds
an extra BIOS-job reboot. Gate the virtual optical UefiTarget translation
behind a new dell_uefi_target flag (default False) on boot_from_iso and
ensure_boot_once, so default behavior is unchanged and callers can enable
it for hosts where a stale boot entry on the virtual CD hijacks Cd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sshnaidm sshnaidm changed the title Use UefiTarget for Dell virtual CD one-time boot Add opt-in UefiTarget boot for Dell virtual CD Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant