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

    Manual Register then straight to imaging

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    6
    678
    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.
    • dsutton2001D
      dsutton2001
      last edited by

      Greetings!
      I am attempting to have a Manual Registration into FOG and then, without rebooting, go straight into the imaging process. Or as close to that as mechanically possible.

      I have found the awesome thread located here: Forum Post

      From that link I was given hope. However, after rereading the article a dozen times, i’m obviously just not picking up on something. And so, I am asking for another pair of eyes in my FOG.MAN.REG to see what i am doing wrong. Please , and thank you.

      FOG.MAN.REG last few lines below.

      dots "Attempting to register host"
      res=""
      while [[ -z $res ]]; do
          res=$(curl -Lks --data "sysuuid=${sysuuid}&mac=$mac&advanced=$(echo -n 1 | base64)&host=$host&imageid=$imageid&primaryuser=$primaryuser&other1=$other1&other2=$other2&doimage=$realdoimage&doad=$blDoAD&location=$location64&username=$user64&groupid=$group64&snapinid=$snapin64&productKey=$productKey" ${web}service/auto.register.php 2>/dev/null)
          echo "$res"
          usleep 2000000
      done
      . /bin/fog.inventory
      
      sysuuid=$(dmidecode -s system-uuid)
      sysuuid=${sysuuid,,}
      mac=$(getMACAddresses)
      curl -Lks -o /tmp/hinfo.txt --data "sysuuid=${sysuuid}&mac=$mac""${web}service/hostinfo.php" -A ''
      [[ -f /tmp/hinfo.txt ]] && . /tmp/hinfo.txt
      
      . /bin/fog.download
      usleep 2000000
      

      The error I am getting is below:
      Screenshot 2023-08-09 210323.png

      Thank you for any assistance you can provide.

      Tom ElliottT george1421G 2 Replies Last reply Reply Quote 0
      • dsutton2001D
        dsutton2001 @Tom Elliott
        last edited by

        @Tom-Elliott thank you for your response. Oddly enough, if I remove the lines listed below, it does the inventory task and then reboots as an out-of-the-box FOG install is expected:

        sysuuid=$(dmidecode -s system-uuid)
        sysuuid=${sysuuid,,}
        mac=$(getMACAddresses)
        curl -Lks -o /tmp/hinfo.txt --data "sysuuid=${sysuuid}&mac=$mac""${web}service/hostinfo.php" -A ''
        [[ -f /tmp/hinfo.txt ]] && . /tmp/hinfo.txt
        
        . /bin/fog.download
        usleep 2000000
        
        george1421G dsutton2001D 2 Replies Last reply Reply Quote 0
        • Tom ElliottT
          Tom Elliott @dsutton2001
          last edited by Tom Elliott

          @dsutton2001 It look slike the /tmp/hinfo.txt isn’t returning the os variable?

          Might need the hostinfo.php file adjusted if this is missing that labelling.

          Otherwise this should work just fine.

          https://github.com/FOGProject/fogproject/blob/master/packages/web/service/hostinfo.php

          Assumign the imageID you’re setting actually exists, this script you have should work just fine.

          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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          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

          dsutton2001D 1 Reply Last reply Reply Quote 0
          • dsutton2001D
            dsutton2001 @Tom Elliott
            last edited by

            @Tom-Elliott thank you for your response. Oddly enough, if I remove the lines listed below, it does the inventory task and then reboots as an out-of-the-box FOG install is expected:

            sysuuid=$(dmidecode -s system-uuid)
            sysuuid=${sysuuid,,}
            mac=$(getMACAddresses)
            curl -Lks -o /tmp/hinfo.txt --data "sysuuid=${sysuuid}&mac=$mac""${web}service/hostinfo.php" -A ''
            [[ -f /tmp/hinfo.txt ]] && . /tmp/hinfo.txt
            
            . /bin/fog.download
            usleep 2000000
            
            george1421G dsutton2001D 2 Replies Last reply Reply Quote 0
            • dsutton2001D dsutton2001 referenced this topic on
            • george1421G
              george1421 Moderator @dsutton2001
              last edited by

              @dsutton2001 said in Manual Register then straight to imaging:

              curl -Lks -o /tmp/hinfo.txt --data “sysuuid=${sysuuid}&mac=$mac”“${web}service/hostinfo.php” -A ‘’

              Along with what Tom mention the above line on the surface looks suspicious. The back to back double quotes look out of place.

              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
              • george1421G
                george1421 Moderator @dsutton2001
                last edited by

                @dsutton2001 That line in question was copied from here: https://github.com/FOGProject/fos/blob/45ba692315f6e5857c12d933ae2c9c4dd5c35778/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog#L8

                Its possible that the curl command or the php page is not working as it should. That php page is only used when you usb boot into fog to pick up the imaging bits.

                If you want to debug this I can give you some places to look.

                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
                • [[undefined-on, dsutton2001D dsutton2001, ]]
                • dsutton2001D
                  dsutton2001 @dsutton2001
                  last edited by

                  it was the hostinfo.php file. I copy and pasted from the link you provided into a new file after renaming the old one. Rebooted the fog server while nudging the edge of the case with a baseball bat, and it certainly wasn’t the bat. great solution. thank you!

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

                  302

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project