iPXE discussion forum

Full Version: ProductName iPXE Settings/Command
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

We are using iPXE for quite some time now, really good solution and good work.

To improve download performance, I need to detect network card model and launch different build of iPXE depending on model.

Detection and switch is not a problem, but I want to show current ProductName (Setting from config/general.h). How can I get this value from my scripts? And how can I show a settings in the menu?

Thanks a lot for your job and reponse.

Christian
I would suggest you use feature detection instead, like I show here: https://gist.github.com/robinsmidsrod/4008017

It uses the user-class setting, but that is only available from the context of the dhcp server, not in a script (AFAIK).
Good idea, but I don't have acces to DHCP server configuration and it doesn't support scripting.

The idea is to detect network card using net0/chip and then chain load the good version of iPXE depending on network card.

At current time, we are testing different version of iPXE to define which version goes best with each card (fastest way to download wim files).
To avoid error, I want to show currently loaded iPXE version (The productName introduced in config/general.h) on all menu (We have menu to select image and for debugin menu to chain load to different version of iPXE).
The version number is available as a settings variable. It was added during the iPXE hackathon in July 2013. See http://ipxe.org/cfg/version for details.
I have seen this settings, but we are using the same version with variable embedded script/option.

The settings I want to show in menu are:
#define PRODUCT_NAME "iPXE - Nework Boot v2.00"
#define PRODUCT_SHORT_NAME "iPXE - NB 2.00"
(../ipxe/src/config/general.h row 27 and 28)
Those variables are not available to scripts. You could try to create a patch, similar to how the version number was added (as it is just compile time static information) in June. It shouldn't be too hard, even I (who's not a C programmer) was able to do it. Smile
Reference URL's