• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    API FOG : How to Apply PxeMenuOptions to Host

    Scheduled Pinned Locked Moved
    General
    api help api pxe pxe menu
    3
    5
    737
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      guyfox
      last edited by

      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

      george1421G 1 Reply Last reply Reply Quote 0
      • JJ FullmerJ
        JJ Fullmer Testers
        last edited by

        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.

        Have you tried the FogApi powershell module? It's pretty cool IMHO
        https://github.com/darksidemilk/FogApi
        https://fogapi.readthedocs.io/en/latest/
        https://www.powershellgallery.com/packages/FogApi
        https://forums.fogproject.org/topic/12026/powershell-api-module

        G 1 Reply Last reply Reply Quote 0
        • george1421G
          george1421 Moderator @guyfox
          last edited by

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

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          1 Reply Last reply Reply Quote 0
          • G
            guyfox
            last edited by

            @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

            1 Reply Last reply Reply Quote 0
            • G
              guyfox @JJ Fullmer
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              241

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project