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

    Add Full Inventory Task to PXE Menu

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    24
    2.9k
    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.
    • F
      FlareImp @george1421
      last edited by

      @george1421 Yes, all my computers are using the fog client, the issue is we are not allowed to set PXE as the first boot option, has to be the hard drive, so it negates the feature. I was just thinking instead of giving our Interns/temp help access to fog and starting inventory tasks from the web gui it would just be faster to PXE boot a computer and select “run inventory”.

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @flareimp said in Add Full Inventory Task to PXE Menu:

        now it is showing the hostname and mac but saying no task found.

        I have to say that I never tried this myself yet and I am not really sure why inventory works when run with the full registration (AFAIK not a task) but otherwise needs a task scheduled. I might find some time to check this out on Friday.

        Would using the FOG API be of any help for you? You could schedule inventory tasks with that. Though someone would still need to manually PXE boot the machine.

        I don’t think we have inventory updates through the fog-client yet. It’s been discussed on github but is a little more complex as we’d want to have it work on Windows, Linux and Mac OS X.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Sebastian Roth

          @FlareImp I just played with this stuff and seem to be able to update the inventory of a host through the custom iPXE menu using this as parameter:

          kernel bzImage loglevel=4 initrd=init.xz root=/dev/ram0 rw ramdisk_size=275000 web=${boot-url}/ consoleblank=0 rootfstype=ext4 mac=${mac} storage=${fog-ip}:/images/ storageip=${fog-ip} loglevel=4 mode=inventory
          imgfetch init.xz
          boot || goto MENU
          

          This is very close to what @george1421 came up with but I removed the deployed=1 parameter at the end of the kernel line because that would make the inventory task to try and check in (NFS mount, task list and so on) though this is not needed for a simple inventory.

          EDIT: Though it seems to do the inventory update the entries in the DB don’t get updated yet. I will take a look at why this is not working.
          EDIT2: Needed to add mac=${mac} parameter to make it work, updated parameter code above should work now. Note this is the first MAC address found by iPXE (same as variable ${net0/mac}). You might need to add some more logic in the iPXE code if you have more than one network adapter in some of your hosts and the inventory update does not work.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          F 1 Reply Last reply Reply Quote 1
          • F
            FlareImp @Sebastian Roth
            last edited by

            @sebastian-roth Thank you and @george1421 for your assistance it this matter. It worked great!

            Thanks again and keep up the great work!

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

            199

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project