Limit what images are shown on the "Deploy Image" FOG PXE menu

  • The company that I work for uses FOG for two main purposes. The primary use is Imaging of desktop and laptop computers. Our manufacturing facility has also started using FOG to image some of the IoT components we build.

    Since the IoT devices don’t get registered with FOG, they are imaged using the “Deploy Image” menu of PXE.
    Our production manager has requested that I create a “production” user who only sees the IoT images when they go to the “Deploy Image” PXE menu.

    What would be the best way of getting this done?

    I have dug into the code a little bit, and it looks like bootmenu.class.php might be the best place to modify.

    I am by no means a PHP guru, but I have a little experience under my belt.

    Any assistance you can provide would be greatly appreciated!


  • Developer

    @tcs_taylor this doesn’t sound like expected behavior. we’re probably going to need help from the other developers if we can confirm this bug. we’ll also need details on exactly what version of fog you’re running

  • Is there a way to do this with a new menu item? I added this code (just to see what it would look like) to my advanced menu text field, but it broke my menu setup. I had my menus setup so that only “perform full host registration” and “production imaging” menus showed up if the host was not registered. after I added this to my advanced menu text field all menu options were showing regardless of if the host was registered. worse, after I removed this from the advanced menu text field, fog is still ignoring the settings which say only show “perform full host registration” and “production imaging” if host is not registered…

    Thanks in advance for any help you can provide.


  • Awesome, thanks so much for your assistance @Junkhacker ! I’m going to try this out right now!

  • Developer

    @tcs_taylor in your advanced menu text field you can put something like this:

    item --gap -- ---------------- iPXE boot menu ----------------
    item return return to previous menu
    item Win7SP1x64 Win7 SP1 64bit Sysprepped
    choose --default return target && goto ${target}
    kernel bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp web=${fog-ip}/fog/ consoleblank=0 loglevel=4 type=down img=Win7SP1x64 ftp=${fog-ip} imgType=n imgPartitionType=all osid=5 storage=${fog-ip}:/images/ capone=1
    imgfetch init.xz
    boot ||
    goto MENU
    chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
    goto MENU

  • I love this idea! I’ve been googling a little this morning and trying to find more information about limiting what images are shown on a menu, but so far have come up dry. Can you please provide more information on how to accomplish this?



  • Developer

    @tcs_taylor as an alternative to modifying the code, you can create an advanced menu that is only the deploy tasks for the desired images. this will allow the menu to persist seamlessly through upgrades