@FlareImp I just played with this stuff and seem to be able to update the inventory of a host through the custom iPXE menu using this as parameter:
kernel bzImage loglevel=4 initrd=init.xz root=/dev/ram0 rw ramdisk_size=275000 web=${boot-url}/ consoleblank=0 rootfstype=ext4 mac=${mac} storage=${fog-ip}:/images/ storageip=${fog-ip} loglevel=4 mode=inventory
imgfetch init.xz
boot || goto MENU
This is very close to what @george1421 came up with but I removed the deployed=1
parameter at the end of the kernel line because that would make the inventory task to try and check in (NFS mount, task list and so on) though this is not needed for a simple inventory.
EDIT: Though it seems to do the inventory update the entries in the DB don’t get updated yet. I will take a look at why this is not working.
EDIT2: Needed to add mac=${mac}
parameter to make it work, updated parameter code above should work now. Note this is the first MAC address found by iPXE (same as variable ${net0/mac}
). You might need to add some more logic in the iPXE code if you have more than one network adapter in some of your hosts and the inventory update does not work.