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

    Image completes but the task doesn't

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    14
    1.2k
    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.
    • george1421G
      george1421 Moderator @ek_N
      last edited by

      @ek_n Well your “debug mode” picture explains why the task is not done. But I also haven’t ever seen a driver post install script cause the imaging to fail. Do you know why its failing to copy the files?

      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
      • E
        ek_N
        last edited by

        Well it doesn’t fail as you can see in the next picture pnputil is installing the drivers.
        and the folder is on the C drive with no missing files.

        “Well your “debug mode” picture explains why the task is not done”
        It’s the copy drivers that fails the entire task to not complete?

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

          @ek_n Did you base your postinstall scripts on my tutorial?
          If not, what does your post install script look like?
          If you go into the fog server linux console and comment out the call to your post install script does FOG image correctly?

          Again I haven’t seen a post install script (before now) stop the imaging process. This may be a new feature in fog 1.5.x series…
          The other option is that the copy is setting an error level because maybe an incomplete copy happened and the master fog script is seeing that error level.

          Either way I would start out by commenting out the call to your custom post install script and confirm that FOG is imaging correctly. Then we can dig into why your script is failing. I might also take a look at the target computer in the Drivers directory and compare if all of the drivers were copied over vs the master driver directory on the FOG server.

          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!

          E 1 Reply Last reply Reply Quote 0
          • E
            ek_N @george1421
            last edited by

            @george1421 So checked the folder and it is missing some files on the target machine when copying.
            Is there a timeout on the script that causes it to kill the transfer if it takes too long?

            Q 1 Reply Last reply Reply Quote 0
            • Q
              Quazz Moderator @ek_N
              last edited by

              @ek_n Can you share the script you’re using? We can’t really comment unless we know what you’re actually using.

              It appears to be George’s script at a glance, but it could be an older version or modifications made to it that we don’t know about.

              At any rate, for it to display that error message means that rsync encountered some kind of error. We don’t really know which one at this point, however.

              Common problems: spaces in paths, permissions, firewalls (and network in general)

              E 1 Reply Last reply Reply Quote 1
              • E
                ek_N @Quazz
                last edited by

                @quazz This is what I have. Followed the guide that George wrote.

                #!/bin/bash
                ceol=`tput el`;
                manu=`dmidecode -s system-manufacturer`;
                dots "Identifying hardware"
                case $manu in
                    [Ll][Ee][Nn][Oo][Vv][Oo])
                        machine=$(dmidecode -s system-version)
                        ;;
                    *[Dd][Ee][Ll][Ll]*)
                        machine=$(dmidecode -s system-product-name)
                        ;;
                    *I[Nn][Tt][Ee][Ll]*)
                        # For the Intel NUC and intel mobo pick up the system type from the
                        # baseboard product name
                        machine=$(dmidecode -s baseboard-product-name)
                        ;;
                    *)
                        # Technically, we can remove the Dell entry above as it is the same as this [default]
                        machine=$(dmidecode -s system-product-name) 
                        ;;
                esac
                
                # if the machine isn't identified then no need to continue with this script, just return to caller
                if [[ -z $machine ]]; then 
                    echo "Unable to identify the hardware for manufacturer ${manu}";
                    debugPause;
                    return;
                fi 
                echo "${machine} Identified";
                
                # Removes Spaces in machine name, works better with path definitions
                
                machine="${machine%"${machine##*[![:space:]]}"}";
                
                dots "Verifying we've found the OS disk"
                if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
                    echo "! OS root Not found !";
                    debugPause
                    return;
                fi
                echo "Found";
                        
                dots "Verifying target Arch"
                system64="/ntfs/Windows/SysWOW64/regedit.exe"
                [[ ! -f $system64 ]] && arch="x86" || arch="x64"
                echo "${arch} found";
                
                debugPause
                
                # set osn path names based on the osid set in the FOG WebGui
                case $osid in
                    5) osn="win7" ;;
                    6) osn="win8" ;;
                    7) osn="win8.1" ;;
                    9) osn="win10" ;;
                esac
                
                dots "Preparing Drivers"
                clientdriverpath="/ntfs/Drivers"
                remotedriverpath="/images/drivers/$machine/$osn/$arch"
                
                debugPause
                
                if [[ ! -d "${remotedriverpath}" ]]; then
                    echo "failed";
                    echo " ! Driver package not found for ${machine}/$osn/$arch ! ";
                    debugPause;
                    return;
                fi
                echo "Ready";
                
                debugPause
                
                [[ ! -d $clientdriverpath ]] && mkdir -p "$clientdriverpath" >/dev/null 2>&1
                echo -n "In Progress"
                
                rsync -aqz "$remotedriverpath" "$clientdriverpath" >/dev/null 2>&1
                
                [[ ! $? -eq 0 ]] && handleError "Failed to download driver information for [$machine/$osn/$arch]"
                
                debugPause
                
                # the following code is only valid for Windows 7 operating systems since Windows 8 and beyond
                # relies on the unattend.xml section to locate OEM drivers. If you are no longer deploying Win7
                # you may exclude this section. 
                
                regfile="/ntfs/Windows/System32/config/SOFTWARE"
                key="\Microsoft\Windows\CurrentVersion\DevicePath"
                devpath="%SystemRoot%\DRV;%SystemRoot%\inf;";
                reged -e "$regfile" &>/dev/null <<EOFREG
                ed $key
                $devpath
                q
                y
                EOFREG
                
                Q 1 Reply Last reply Reply Quote 0
                • Q
                  Quazz Moderator @ek_N
                  last edited by

                  @ek_n Okay, good. So rsync fails at some point, we need to know why that is.

                  If you modify

                  [[ ! $? -eq 0 ]] && handleError "Failed to download driver information for [$machine/$osn/$arch]"
                  

                  To something like

                  [[ ! $? -eq 0 ]] && handleError "Failed to download driver information for [$machine/$osn/$arch] with error code $?"
                  

                  And then try again, it should now also give us the exit code of rsync which should tell us what goes wrong (though not necessarily why)

                  E 1 Reply Last reply Reply Quote 1
                  • E
                    ek_N @Quazz
                    last edited by

                    @quazz So I tried it on a different model a laptop latitude 7480. And it works great no issues.
                    It’s just the workstation that is having the issue.
                    I can’t see that it copied every thing except the “video” folder which appears to be 2.89 GB. In size.
                    I had to hand out the desktop and don’t have one to test it on.

                    I will update you next time I try it.

                    Q 1 Reply Last reply Reply Quote 0
                    • Q
                      Quazz Moderator @ek_N
                      last edited by

                      @ek_n Is that folder essential?

                      1 Reply Last reply Reply Quote 0
                      • E
                        ek_N
                        last edited by

                        Hey guys we can close this I solved it.

                        The drivers that i had extracted with 7-zip was incomplete and with errors.
                        Removed the folder and extracted the .cab with pea zip and it started working as normal again.

                        Don’t know why that made it work, but it did. 🙂

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

                        211

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project