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

Set Ipxe Menu selected Item conditionally

Scheduled Pinned Locked Moved
Tutorials
2
6
821
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.
  • T
    tatanas
    last edited by Jul 12, 2022, 6:43 AM

    Hi,

    I know how to select a IPXE item menu by default through the web console.
    I would like to know if we can select an item by default when the host is not registered and another if the host is ?
    I can’t see a way to do it in http://@fogserverIP/fog/service/ipxe/boot.php.

    Thanks for your time.

    G 1 Reply Last reply Jul 12, 2022, 12:50 PM Reply Quote 0
    • G
      george1421 Moderator @tatanas
      last edited by Jul 12, 2022, 12:50 PM

      @tatanas I have not tested this so I’m only giving an idea.

      You can setup a fog ipxe menu as a default menu.
      You can setup a fog ipxe menu to only be displayed when a host is unregistered or a host is registered.

      These are two different actions so I would think you could combine them to get the desired results.

      There is an easy way to test and confirm. Create the two ipxe menus as I mentioned. Then get a mac address of a computer that is already registered.

      from a windows browser call up this url for an unregistered host.
      http://<fog_server_ip>/fog/service/ipxe/boot.php?mac=00:00:00:00:00:00

      Search the page for the word default.

      Now call up the same url with a registered host mac address
      http://<fog_server_ip>/fog/service/ipxe/boot.php?mac=AA:BB:CC:DD:EE:FF

      Again search for the word default. This should give you the menu for the registered host. Again I have not tested this but this is how it should work.

      T 1 Reply Last reply Jul 13, 2022, 9:25 AM Reply Quote 0
      • T
        tatanas @george1421
        last edited by tatanas Jul 13, 2022, 3:48 AM Jul 13, 2022, 9:25 AM

        @george1421 Ok. I think I understand how it works. Let me try to resume :

        When you call this url http://<fog_server_ip>/fog/service/ipxe/boot.php?mac=xx:xx:xx:xx:xx:xx, the boot.php file (located in /var/www/fog/service/ipxe/boot.php) will get the host informations through the mac address then create a personalized boot menu

        new BootMenu();
        

        This function can be found in /var/www/fog/lib/fog/bootmenu.class.php.
        So it seems I should try to modified this file to change the default selected item depending on the host is registered or not ?

        T G 2 Replies Last reply Jul 13, 2022, 9:48 AM Reply Quote 0
        • T
          tatanas @tatanas
          last edited by Jul 13, 2022, 9:48 AM

          In the web console>iPXE Menu Customization, when I change the fog.local item menu from “All Hosts” to “Registered Hosts” and sets it to default, it become the default setup for the “Not registered Host” menu fog.reginput too.

          1 Reply Last reply Reply Quote 0
          • G
            george1421 Moderator @tatanas
            last edited by Jul 13, 2022, 10:03 AM

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • T
              tatanas
              last edited by Jul 13, 2022, 11:33 AM

              Forget about it. It seems there is no easy way to do it and it’s not a big deal even if this kind of boot menu isn’t set up.
              Thanks for your guidance.

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

              222

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project