Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist network booting in a MAC address independent way? #59

Open
rgl opened this issue Jun 1, 2020 · 2 comments
Open

Persist network booting in a MAC address independent way? #59

rgl opened this issue Jun 1, 2020 · 2 comments
Assignees
Labels
boot-discovery uefi-future Everything is possible given enough time and energy

Comments

@rgl
Copy link

rgl commented Jun 1, 2020

It would be nice to configure UEFI network booting in a MAC address independent way.

That would allow us to have a golden image and use it in any other pi. Currently this cannot be done because the boot option seems to be associated with the MAC address, so it cannot be used in a different pi.

@samerhaj
Copy link
Member

samerhaj commented Jun 1, 2020

There is some support for this in UEFI Spec and TianoCore

The current language allows for HW location-independent boot options for USB, HDD, or URI boot options.. This allows describing "boot from USB key" for example regardless of where the disk is located (which USB port, which results in inclusion of PCI/USB DP nodes in the full DevicePath for instance). Similarly for Boot from URI(), a full device path will include the MAC address (and PCI nodes if the NIC is on a PCI device), while a short-form only includes the "Uri()" DP node:

UEFI 2.8 spec, section 3.1.2 Load Option Processing, around "Short-Form Device Path":

The boot manager must also support booting from a short-form device path that starts with the first element being a URI Device Path (see Table 83). When the boot manager attempts to boot a short-form URI Device Path, it could attempt to connect any device which will produce a device path protocol including a URI device path node until it matches a device, or fail to match any device. The boot manager will enumerate all LoadFile protocol instances, and invoke LoadFile protocol with FilePath set to the short-form device path during the matching process.

The relevant code in TianoCore EDK2 is at:

https://github.com/tianocore/edk2/blob/a56af23f066e2816c67b7c6e64de7ddefcd70780/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c#L711

Some experiments are needed to figure out how to construct the proper Boot#### option with the short-form device path. This is currently not supported in the UiApp or Shell built-in commands

@samerhaj samerhaj self-assigned this Jun 1, 2020
@samerhaj samerhaj added the uefi-future Everything is possible given enough time and energy label Jun 1, 2020
@OGKevin
Copy link

OGKevin commented May 20, 2021

Is there any change on this since almost a year has passed 🤔 or is

This is currently not supported in the UiApp or Shell built-in commands

Still true? Because I basically ran into this in #151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
boot-discovery uefi-future Everything is possible given enough time and energy
Projects
None yet
Development

No branches or pull requests

3 participants