• Hello ,
    i’m working with Fog APi , and would like after deployment than my host boot on an custom menu integrated in fog , via PXE .

    I’d like to know if there is a way to force a host to boot to this special pxe menu with API ?
    I can see pxemenuoptions, and ipxe core objects , but i cannot find how to associated them to a host .

    Does someone have an Idea ?
    Thanks in Advance

  • i think i’ve found the solution .

    i just made a new ipxemenu entry with my winpe and force via API , the default parameter to 1 to this menu entry i can find in coreobjects pxemenuoptions.

    i’ll keep you informed

  • @george1421 , Thanks for explanations , very clear . , i’ll keep it in mind.

    @JJ-Fullmer ,
    I try to create automation to script an image after deployment , but this image after cloning have to reach a winpe boot , for offline editing, thing than postdownloadscript cannot do.
    I tried to automate ipxe boot menu to force host to enter into this custom bootmenu. via API .

    I’ve to dig into @george1421 explanations.

    Thanks for your help

  • Moderator

    @guyfox Please explain what your goal is here, There maybe another way to go about this.

    The way that FOG PXE boots into imaging is in 2 stages. The first part is using the iPXE boot loader which is powered by the iPXE menu section in the FOG configuration. The second stage of booting into imaging is the iPXE menu loads FOS Linux (in the form of bzImage and init.xz into memory then launches it.

    In the stage one booting the target computer loads either undionly.kpxe or ipxe.efi from the FOG server into memory then starts iPXE. The previously mentioned boot loaders have a script built in that loads default.ipxe from the FOG server and runs it. This default.ipxe file is a text file that is a script that calls boot.php from the fog server. This boot.php then builds the fog iPXE boot menu.

    With this in mind. You could inject your custom iPXE menu by replacing the default.ipxe script with your custom iPXE menu as long as one of the menu items in your custom menu would chain into the boot.php menu so FOG could create it iPXE menu.

    I know this is a very high-level explanation of how it works, but the point it IS possible to do what you want, maybe just not through the API. To make your menu a bit more dynamic you could write your own php code that access the mysql database and then build your own iPXE menu based on the results of the database query.

  • Testers

    So you’re wanting them to boot to the network and then to a different fog menu then the default?

    Have you accomplished this outside of the api? i.e in the fog gui anywhere?

    I’m just not clear on what you’re trying to set so it’s hard to say yes/no on if it’s something the API can do.