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

Manual Register then straight to imaging

Scheduled Pinned Locked Moved Solved
FOG Problems
3
6
708
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.
  • D
    dsutton2001
    last edited by Aug 10, 2023, 1:08 AM

    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.

    T G 2 Replies Last reply Aug 10, 2023, 9:20 AM Reply Quote 0
    • D
      dsutton2001 @Tom Elliott
      last edited by Aug 10, 2023, 1:41 PM

      @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
      
      G D 2 Replies Last reply Aug 10, 2023, 5:33 PM Reply Quote 0
      • T
        Tom Elliott @dsutton2001
        last edited by Tom Elliott Aug 10, 2023, 3:22 AM Aug 10, 2023, 9:20 AM

        @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

        D 1 Reply Last reply Aug 10, 2023, 1:41 PM Reply Quote 0
        • D
          dsutton2001 @Tom Elliott
          last edited by Aug 10, 2023, 1:41 PM

          @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
          
          G D 2 Replies Last reply Aug 10, 2023, 5:33 PM Reply Quote 0
          • D dsutton2001 referenced this topic on Aug 10, 2023, 4:04 PM
          • G
            george1421 Moderator @dsutton2001
            last edited by Aug 10, 2023, 5:30 PM

            @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
            • G
              george1421 Moderator @dsutton2001
              last edited by Aug 10, 2023, 5:33 PM

              @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, D dsutton2001, Feb 16, 2024, 2:20 AM]]
              • D
                dsutton2001 @dsutton2001
                last edited by Feb 16, 2024, 2:22 AM

                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
                1 / 1
                • First post
                  1/6
                  Last post

                252

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project