iPXE boot scripts can chainload loader.efi and offer an initrd via
"initrd <url>" before "boot". At kernel-exec time iPXE advertises
that blob through EFI_LOAD_FILE2_PROTOCOL on a fixed vendor device
path (LINUX_EFI_INITRD_MEDIA_GUID) -- the same mechanism the Linux
5.7+ EFI stub uses to find an initrd with no filesystem involved.
FreeBSD netboot images are typically a full boot environment rather
than one extra file for an already-selected kernel, so treat this
the same way memdisk=/memcd= already are: fetch, decompress, and
register the blob as the boot device (RAM disk protocol, falling
back to md(4)) before disk enumeration, instead of handing it to
the kernel as a late module.
do_download_ramdisk()'s register-or-fallback tail is factored out
into register_ram_disk() so the new maybe_load_ipxe_initrd() probe
can share it.
Assisted-by: Claude Sonnet 5
Sponsored by: Netflix