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

    Trigger a script directly after partclone that requests input and copies a folder

    Scheduled Pinned Locked Moved
    FOG Problems
    7
    30
    7.8k
    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
      abos_systemax @abos_systemax
      last edited by

      @abos_systemax said in Trigger a script directly after partclone that requests input and copies a folder:

      @george1421 At my company we deploy for multiple customers; I want to echo a script to the šŸ˜„ drive of the just deployed machine that contains the computername that we have decided for the machine. Since we are unable to use the FOG Client on Windows (not our devices, nor our images), I have to find other ways.

      Your script seems to work, with one problem: I cannot type anything. The same problem occurs when I run a Debug Deployment; the FOS doesn’t seem to recognize my keyboard on a Fujitsu E546.

      it does work with an external keyboard…
      is that a driver related issue?

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

        it does work with an external keyboard…
        is that a driver related issue?

        almost certainly, yes.
        personally, i’d just use an external keyboard instead of troubleshooting further…

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

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

          @Junkhacker said

          almost certainly, yes.
          personally, i’d just use an external keyboard instead of troubleshooting further…

          I agree, you only need the external keyboard for deployment. Once the windows kernel boots then the onboard keyboard should work.

          You have to remember that the FOG system (FOS client specifically) is linux based. So its may not be possible to have every flavor of driver possible. I suspect that the keyboard is connected behind some kind of onboard controller that linux doesn’t support.

          To restate what @Junkhacker just posted, go ahead and use an external keyboard for deployment, then move on to the next issue.

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

            @george1421 said in Trigger a script directly after partclone that requests input and copies a folder:

            @Junkhacker said

            almost certainly, yes.
            personally, i’d just use an external keyboard instead of troubleshooting further…

            I agree, you only need the external keyboard for deployment. Once the windows kernel boots then the onboard keyboard should work.

            You have to remember that the FOG system (FOS client specifically) is linux based. So its may not be possible to have every flavor of driver possible. I suspect that the keyboard is connected behind some kind of onboard controller that linux doesn’t support.

            To restate what @Junkhacker just posted, go ahead and use an external keyboard for deployment, then move on to the next issue.

            Yes. The only problem is that I will have 1000ths of laptops that have to be deployed. But that is my problem; I get that the problem is a driver related issue; I think I’ll have to use variables and good’ol mySQL to automate the process instead of typing a computername.

            I thank you all for replying; I now know how to actually trigger a script; All I need to figure out now is the automation part.

            -Alex

            george1421G Tom ElliottT 2 Replies Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @abos_systemax
              last edited by george1421

              @abos_systemax If you have that many systems I would take a slightly different approach but still within the framework of FOG.

              If you have 1000 systems and have them cataloged (system name and mac address), you can import those systems into fog as hosts. This catalog can come from any tool that can create a .csv file. So you could use excel to create a table of your systems (computer name vs mac address). Upload them into FOG and then create a post install script that takes fog post install variable $hostname and insert that into the sed script (instead of $compname)I posted before. This way no mysql queries are needed, everything is in FOG and you are using the resources provided by FOG for imaging. You still are not using the fog client for anything. You are just updating the unattend.xml with the value (indirectly) from your csv upload.

              The other option is to just let fog create an auto number of the systems are they are registered, like nc0001 for the first system, nc0002 for the second and so on.

              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
              • Tom ElliottT
                Tom Elliott @abos_systemax
                last edited by

                @abos_systemax is the only reason you want to trigger a script so you can have the user define the hostname? There is already a way to automate setting up a hostname for the system within fog. Assuming you do register the systems you could use auto population to at least help with the naming part by itself.

                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

                A 1 Reply Last reply Reply Quote 1
                • A
                  abos_systemax @Tom Elliott
                  last edited by

                  @Tom-Elliott

                  Hi Tom, No this script here is actually just a testing tool to see the possibilities I can create with postdownload script. I’ve noticed the Early Hostname changer in Fog Trunk which is a great option if it works like I am expecting it to work.

                  Right now I’m building my current environment into Fog, without loss of functionality from the old environment (Windows+Ghost+a self-written .net app), there I have the option to check the hostname before it is submitted; that is why I needed this option.

                  I’ll definitely delve into the Early hostname changer soon

                  Also, we do the deployment for several customers, some want us to change the name, some dont. Some want us to use a specific format, others want other formats. If it was for internal use; then the auto population could be an option; but all we do is custom tailored; even our fog installation šŸ™‚
                  – the reason that I do not use the Fog Boot menu is because we do not know the MAC adressess beforehand; we do however know the Serialnumber (and so does iPXE: DmiDecode), iPxe also know the MACadress; so we use a script in iPxe to tell fog that the right device has booted and is online.
                  I’m still busy developing all the databases behind that, because we will not be able to completely use the FOG mainframe, but will definitely use the backplane

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

                    @abos_systemax

                    I’ve noticed the Early Hostname changer in Fog Trunk which is a great option if it works like I am expecting it to work.

                    and how are you expecting it to work?

                    – the reason that I do not use the Fog Boot menu is because we do not know the MAC adressess beforehand;

                    i’m not understanding what one has to do with the other

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

                    A 1 Reply Last reply Reply Quote 0
                    • A
                      abos_systemax @Junkhacker
                      last edited by

                      @Junkhacker
                      The two have nothing to do with each other in this context.=
                      I am expecting the early hostname changer to work with the field hostname from the Fog Dbase, am I correct here?

                      Right now we are using the field Hostname from the table Hosts to identify the machine (we prefill it with the serialnumber), if I am correct in my expectation above, then we have to change that functionality to use a field not used by the hostname changer.

                      Other question: is it possible to turn it on- or off, per device?

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

                        @abos_systemax said in Trigger a script directly after partclone that requests input and copies a folder:

                        Right now we are using the field Hostname from the table Hosts to identify the machine (we prefill it with the serialnumber), if I am correct in my expectation above, then we have to change that functionality to use a field not used by the hostname changer.

                        i don’t understand what you’re trying to do here. are you trying to give the computer a name that matches it’s serial number?

                        Other question: is it possible to turn it on- or off, per device?

                        no

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

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          abos_systemax @Junkhacker
                          last edited by

                          @Junkhacker
                          Currently, we are using the Hostname field in the table Hosts to identify the machine in iPXE as ā€˜prestaged’ for Fog.
                          If the hostname changer does use this specific field to insert the name (and correct me If I am wrong here), then we will have to change our own script that currently also uses this field, because the actual hostname will be different (based on customer preferences)

                          If the above is true , then I will need to find alternative means to prestage devices. If the Easy Hostname Change option uses a different database or table, then please let me know.

                          p.s. We do not use the windows client, I am talking about the ā€˜Fog OS Easy hostname change’ option

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

                            @abos_systemax the early hostname changer uses the host name, as listed in the host profile. why not just name it in fog what you want the name of the computer to be?
                            the early hostname changer does not use the client, it mounts the drive of the just imaged computer and edits the registry

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

                            A I 2 Replies Last reply Reply Quote 0
                            • A
                              abos_systemax @Junkhacker
                              last edited by

                              @Junkhacker
                              Early design choices, that’s why I am asking which field is being used šŸ™‚
                              I now know what to do to ensure a working environment, thank you; you have all been very helpfull.

                              1 Reply Last reply Reply Quote 0
                              • I
                                ITSolutions Testers @Junkhacker
                                last edited by

                                @Junkhacker If I understand him correctly, the way they stage the machines is by creating a host entry in the DB with the Serial number as the Hostname. With a custom iPXE script the machine PXE boots reads the serial number, finds if there is a host with that serial number and then does the imaging. This can be useful in the sense that they know the serial and not the MAC. When the machine is plugged in the first time you don’t need need to do anything it just works.

                                @abos_systemax I would recommend using one of the ā€œotherā€ fields for the serial number because the early host name changer does use the hostnmae field and is not configurable.

                                A 1 Reply Last reply Reply Quote 2
                                • A
                                  abos_systemax @ITSolutions
                                  last edited by

                                  @ITSolutions Thanks for the confirmation. That was exactly our case.

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

                                    just to give you some more information to work with, in addition to the ā€œhostsā€ table, there is also the associated ā€œinventoryā€ table that contains hardware information about all registered hosts, including the serial number

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

                                    157

                                    Online

                                    12.0k

                                    Users

                                    17.3k

                                    Topics

                                    155.2k

                                    Posts
                                    Copyright Ā© 2012-2024 FOG Project