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

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

    Scheduled Pinned Locked Moved
    General Problems
    bootmenu deploy pxe menu
    2
    7
    1.3k
    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.
    • TCS_TaylorT
      TCS_Taylor
      last edited by

      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!

      TCS_Taylor

      JunkhackerJ 1 Reply Last reply Reply Quote 0
      • JunkhackerJ
        Junkhacker Developer @TCS_Taylor
        last edited by Junkhacker

        @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

        signature:
        Junkhacker
        We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

        1 Reply Last reply Reply Quote 0
        • TCS_TaylorT
          TCS_Taylor
          last edited by

          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?

          Thanks!

          Taylor

          JunkhackerJ 1 Reply Last reply Reply Quote 0
          • JunkhackerJ
            Junkhacker Developer @TCS_Taylor
            last edited by

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

            :MENU
            menu
            item --gap -- ---------------- iPXE boot menu ----------------
            item return return to previous menu
            item Win7SP1x64 Win7 SP1 64bit Sysprepped
            choose --default return target && goto ${target}
            
            :Win7SP1x64
            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
            :return
            chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
            prompt
            goto MENU
            

            signature:
            Junkhacker
            We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

            1 Reply Last reply Reply Quote 0
            • TCS_TaylorT
              TCS_Taylor
              last edited by

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

              1 Reply Last reply Reply Quote 0
              • TCS_TaylorT
                TCS_Taylor
                last edited by

                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.

                Taylor

                JunkhackerJ 1 Reply Last reply Reply Quote 0
                • JunkhackerJ
                  Junkhacker Developer @TCS_Taylor
                  last edited by

                  @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

                  signature:
                  Junkhacker
                  We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

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

                  192

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project