iPXE discussion forum
ProductName iPXE Settings/Command - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: ProductName iPXE Settings/Command (/showthread.php?tid=7055)

ProductName iPXE Settings/Command - Christian Bovey - 2013-10-14 07:45


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.


RE: ProductName iPXE Settings/Command - robinsmidsrod - 2013-10-15 13:12

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).

RE: ProductName iPXE Settings/Command - Christian Bovey - 2013-10-15 16:05

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).

RE: ProductName iPXE Settings/Command - robinsmidsrod - 2013-10-20 09:40

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.

RE: ProductName iPXE Settings/Command - Christian Bovey - 2013-10-22 15:35

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)

RE: ProductName iPXE Settings/Command - robinsmidsrod - 2013-10-23 10:35

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