Custom Full Host Registration Menu for 1.4.0.rc2 and later

  • Custom FOG Full host registration

    This guide is to allow you remove questions asked during the full host registration process. In previous versions of FOG, the only way to customize this was to modify the /bin/ manually. The instructions on this link are for FOG versions 1.2.0 and below:

    In FOG 1.4.0rc2 and higher, we must use post init scripts. Once a major update is released, this tutorial can be modified to reflect those changes.

    Let’s start by creating a few scripts. Secondly we will modify the fog.postinit script to call our custom scripts. Our first script that we will create will be called which will be a modified version of the script in /bin/ This script is actually everything that is performed when selecting the full host registration option when you boot into FOG but this tutorial utilizes post init scripts to “copy” our customized script and replaces /bin/ script. So let’s go to our steps and begin:

    Step 1
    Obtain a copy of /bin/ so we can modify it to our needs.
    Here is the link on github:

    We can go ahead and place this file under /images/dev/postinitscripts/ and rename it to so we can reference it later.

    As in the Wiki link earlier above, we will now modify the script using the same concepts. A good rule of thumb is for every question you want to remove during the full host registration process, you will have to delete the variable towards the bottom of the code.


    while [[ -z $askme ]]; do
        echo -n "    Would you like to associate this host with groups? (y/N) "
        read askme
        case $askme in
                setIDs "groupid" "group" "true" "" 20
                echo " * Invalid input, please try again"

    So if you don’t want to be asked this question above, you must delete everything between askme="" and done. Then towards the bottom of the code, you will see the following:

    while [[ -z $res ]]; do
        res=$(curl -ks --data "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" http://${web}service/auto.register.php 2>/dev/null)
        echo "$res"
        usleep 2000000

    Look for the section where it says groupid because that is the variable we no longer need. So from there delete the following: &groupid=$group64 The & must be in the front of the variable being removed in case another variable must follow.

    By following the steps on the Wiki link

    We can follow the same concepts. Now we can just really skip any modifications to the inits.

    Step 2
    Now that we have a customized script and placed it in the proper directory, we can now create the script that fog.postinit will call. We will call this script patch.fullreg and use the following code:

    echo "Installing Patch"
    cp -f ${postinitpath} /bin/
    echo "Done Patching stuff"

    We then save that file also in the same directory that and fog.postinit which is /images/dev/postinitscripts/ As you can see, we are really just copying our custom script to This allows us to basically simplify our full host registration process. Through this process, we can now remove questions like product key, user1, user2, primary user, active directory, etc.

    Notes: This will not work if using fog 1.3.0 - 1.4.0 rc 1 from my understanding. I’m sure I will be updating this post and making changes to improve the language and references. Hopefully with this, we can update the Wiki page to reflect the newer version of FOG and utilizing post init scripts in the future.

  • @george1421 Finally got around to testing this. I was able to remove the unwanted options, no issues.

    I was also able to get it set to join AD domain, but I wasn’t able to get it to pick an image or snapins. Is there a specific way that the values need to be entered?

  • Moderator

    @Avaryan Yes you could “hard wire” the registration script to select any option required.

    There is also a plugin that simulates static groups. You create a template host and link it with a group. Then when you add a new host to that group, the template host settings get copied to the new host.

  • Would it be possible to select a default image and snapins and not have it show those options?

Log in to reply





Looks like your connection to FOG Project was lost, please wait while we try to reconnect.