[ipxe-devel] Add HDD serial and model to cfg setting

Sebastian Roth sebaroth at gmx.de
Tue Oct 24 21:33:52 UTC 2017


Hi iPXE devs,

playing with different ideas of identifying hosts on PXE boot I found
that MAC address isn't always suitable for us (people use same USB NICs
for several machines). While uuid, serial and asset should be perfect it
turns out that some machines have non-unique or even empty values set
for those (seen this on VM and hardware!).

So I went ahead and looked at HDD serial number which seems to be more
reliable than the other ones - at least in my case. Here is a short
piece of code (tested on Debian Jessie) showing how to retrieve HDD
information using one simple ioctl call:

https://gist.github.com/Sebastian-Roth/026b977b0006bce8f81acec5bc3425a4

I'd happily provide a proper patch proposal but I am not sure where to
wisely add this to the iPXE code (structure) yet. It's not SMBIOS info
and surely not network stuff.

For suggestions on how/where to add this to the iPXE code I'd be very
grateful! As well let me know if you think this shouldn't be added to
the official code at all.

Thanks in advance!

Sebastian



More information about the ipxe-devel mailing list