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

    Specification pc before deploy

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    9
    530
    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.
    • A
      alexamore90
      last edited by

      Hi, it s possible see specification pc before deploy ? At home page pxe without registration host?

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @alexamore90
        last edited by

        @alexamore90 PC specifications in what form?

        When the computer is in the iPXE menu before image registration you are restricted to what information is available in iPXE. Registration uses FOS Linux so better quality of information about the PC is accessible there.

        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!

        A 1 Reply Last reply Reply Quote 1
        • A
          alexamore90 @george1421
          last edited by

          @george1421

          Ok , but without registration before deploy as home page pxe ?

          george1421G 1 Reply Last reply Reply Quote 0
          • george1421G
            george1421 Moderator @alexamore90
            last edited by

            @alexamore90 said in Specification pc before deploy:

            but without registration before deploy as home page pxe

            Again, what info do you need to see?

            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
            • A
              alexamore90
              last edited by alexamore90

              Ciao, allora mi spiego meglio.
              ogni volta che accendiamo i pc, dobbiamo sempre controllare il processore e la quantita’ di ram all interno. E per fare cio’ dobbiamo entrare sempre nel bios e poi successivamente avviare il pxe per il deploy.
              La domanda è: esiste un modo, dopo aver avviato il pxe e quindi nel menu’ fog,controllare queste informazioni prima di cliccare deploy ? tipo una finestra che esce da sola prima del menu iniziale fog e mi mostra le info ?
              so gia che esiste Host registration che mi mostra anche le info, ma non volendo registrare nessun host ? e’ possibile visualizzare queste info?
              Grazie

              george1421G 1 Reply Last reply Reply Quote 0
              • george1421G
                george1421 Moderator @alexamore90
                last edited by george1421

                @alexamore90 I think I have a solution to your request.

                First let me give you an idea how FOG Imaging works. When you pick a FOG iPXE menu 2 files are downloaded from the FOG server. They are bzImage (the kernel) and init.xz (the virtual hard drive). Those two files create FOS Linux. That FOS Linux is a custom version of Linux specifically created for the FOG Project.

                FOS Linux has several bash (batch) files that carry out the imaging process. What we will do with this plan is to patch an existing bash script file to display the inventory information before the imaging process starts. The only trouble here is you will be required after the inventory is displayed to press the enter key to start the download to the target computer.

                How we will patch FOS Linux is similar to how we patched the manual registration process for another solution. I have a tutorial on the solution here: https://forums.fogproject.org/topic/14278/creating-custom-hostname-default-for-fog-man-reg

                In the example above we replace fog.man.reg with a custom version to do what the OP wanted. In your case we will replace fog.download with one we will adjust to display the inventory information.

                The details of your solution is to insert the following code into the fog.download file at this location: https://github.com/FOGProject/fos/blob/4662011551d788ba302a4e6da4a7cc9cad99a01f/Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.download#L7

                getHardDisk
                doInventory
                
                if [[ -z $1 ]]; then
                    echo -e "\n\n\n"
                    echo "   +---------------------------+"
                    echo "   |     System Information    |"
                    echo "   +---------------------------+"
                    dots "System Manufacturer:"
                    echo "$sysman"
                    dots "System Product Name:"
                    echo "$sysproduct"
                    dots "System Version:"
                    echo "$sysversion"
                    dots "System Serial Number:"
                    echo "$sysserial"
                    dots "System UUID:"
                    echo "$sysuuid"
                    dots "Computer Form Factor:"
                    echo "$systype"
                    usleep 1000000
                    echo "   +---------------------------+"
                    echo "   |      BIOS Information     |"
                    echo "   +---------------------------+"
                    dots "BIOS Version:"
                    echo "$biosversion"
                    dots "BIOS Vendor:"
                    echo "$biosvendor"
                    dots "BIOS Date:"
                    echo "$biosdate"
                    usleep 1000000
                    echo "   +---------------------------+"
                    echo "   |  Motherboard Information  |"
                    echo "   +---------------------------+"
                    dots "Motherboard Manufacturer:"
                    echo "$mbman"
                    dots "Motherboard Product Name:"
                    echo "$mbproductname"
                    dots "Motherboard Product Version:"
                    echo "$mbversion"
                    dots "Motherboard Serial Number:"
                    echo "$mbserial"
                    dots "Motherboard Asset Tag:"
                    echo "$mbasset"
                    usleep 1000000
                    echo "   +---------------------------+"
                    echo "   |      CPU Information      |"
                    echo "   +---------------------------+"
                    dots "CPU Manufacturer:"
                    echo "$cpuman"
                    dots "CPU Version:"
                    echo "$cpuversion"
                    dots "CPU Current Speed:"
                    echo "$cpucurrent"
                    dots "CPU Max Speed:"
                    echo "$cpumax"
                    usleep 1000000
                    echo "   +---------------------------+"
                    echo "   |     Memory Information    |"
                    echo "   +---------------------------+"
                    dots "Memory:"
                    echo "$mem"
                    usleep 1000000
                    echo "   +---------------------------+"
                    echo "   |   Hard Disk Information   |"
                    echo "   +---------------------------+"
                    dots "Hard Disk:"
                    echo "$hdinfo"
                    usleep 1000000
                    echo "   +---------------------------+"
                    echo "   |      Case Information     |"
                    echo "   +---------------------------+"
                    dots "Case Manufacturer:"
                    echo "$caseman"
                    dots "Case Version:"
                    echo "$casever"
                    dots "Case Serial Number:"
                    echo "$caseserial"
                    dots "Case Asset Number:"
                    echo "$caseasset"
                    echo -e "\n\n\n"
                
                    echo " * Press [Enter] key to continue"
                    read  -p "$*"
                fi
                
                

                Understand this is the complete inventory so you can pick what you need to see and then delete what you don’t want to see. That part is up to you.

                I patched a fog.download file for you already
                fog.download.txt

                HINT: I had to add .txt onto the end of the file to get the FOG Project site to except the file. When you extract the text file rename it back to fog.download

                WARNING: If you edit this file on a windows computer use notepad++ and not windows notepad. Windows notepad adds extra stuff that will make linux unhappy.

                You must understand I did not test or debug this program change. I did take the program code from other parts of FOG imaging and inserted it here. If you follow the instructions to patch the fog.download program it should display the inventory after this banner

                 ==================================
                 ===        ====    =====      ====
                 ===  =========  ==  ===   ==   ===
                 ===  ========  ====  ==  ====  ===
                 ===  ========  ====  ==  =========
                 ===      ====  ====  ==  =========
                 ===  ========  ====  ==  ===   ===
                 ===  ========  ====  ==  ====  ===
                 ===  =========  ==  ===   ==   ===
                 ===  ==========    =====      ====
                 ==================================
                 ===== Free Opensource Ghost ======
                 ==================================
                 ============ Credits =============
                 = https://fogproject.org/Credits =
                 ==================================
                 == Released under GPL Version 3 ==
                 ==================================
                 Version: $version"
                 Init Version: $initversion"
                
                

                And then wait until you press enter to start imaging

                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!

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

                  @alexamore90 Maybe there is a simpler way than the one @george1421 pointed out using a plain postinit script to print out the information you need and wait for someone to press a key to proceed.

                  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 1
                  • A
                    alexamore90 @george1421
                    last edited by

                    @george1421 giorgio I would like to try to replace that fog.download file with the one you gave me, in which folder should it be replaced?

                    george1421G 1 Reply Last reply Reply Quote 0
                    • george1421G
                      george1421 Moderator @alexamore90
                      last edited by

                      @alexamore90 said in Specification pc before deploy:

                      in which folder should it be replaced

                      The answer is difficult to explain in just a few words.

                      The fog.download file is actually in the FOS Linux image that gets transferred to the target computer before imaging begins.

                      The fog developers provided two call out functions where the fog admin can do things before imaging starts and just after imaging stops but before the target computer reboots. You will use the first call out that the developers give you called a post init script. This call out script is called just after FOS Linux (the OS that runs on the target computer boots). My idea is to use this first call out to copy the patched fog.download script from the fog server to FOS linux, then when imaging starts it will use your patched file with the data you need to see. I would place the file to copy in the same directory as where the post init scripts are called from.

                      NOW Sebastian mentioned an easier way to go about this without patching the fog.download file. In that you will again use the post init script call out script to simply print the info you need then pause waiting for a key press before continuing. There is nothing to patch, you will simply create a bash script in the post init directory and then call it from the post init callout script.

                      Thinking outside the box, actually you have the power of php engine on the fog server. If one stretches their imagination a bit, this same script that displays your information on the screen, you should use php mail and send the contents of the fields in an email to you. This is a little harder to setup, but its not that hard to do.

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

                      200

                      Online

                      12.1k

                      Users

                      17.3k

                      Topics

                      155.3k

                      Posts
                      Copyright © 2012-2024 FOG Project