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

    Windows 10 Drivers Not Copying

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    33
    9.1k
    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.
    • UWPVIOLATORU
      UWPVIOLATOR
      last edited by UWPVIOLATOR

      FOG 1.4.4
      Ubuntu 16.04

      Here is my fog.drivers

      I had @george5848 and Tom work on this in the past. Works great for Windows 7 x86 or x64. Now tried to do the same for Windows 10 1709 EDU but it is not dropping the driver folder onto the disk. Ran Debug and it looks like it found the folder so I am not seeing why it’s not copying down.

      I know Optiplex 580 is old but just using it as a test. There is just a .txt file in its driver folder. Also tested this on our main desktop that we have HP Compaq Elite 8300 same issue.

      0_1513616162872_60b0abe3-50dd-4d10-a005-14b95223d58b-image.png

      #!/bin/bash
      ceol=`tput el`;
      manu=`dmidecode -s system-manufacturer`;
      case $manu in
          [Ll][Ee][Nn][Oo][Vv][Oo])
              machine=$(dmidecode -s system-version)
              ;;
          *[Dd][Ee][Ll][Ll]*)
              machine=$(dmidecode -s system-product-name) #pruduct is typo, just realized sorry :(
              ;;
          *)
              machine=$(dmidecode -s system-product-name) # Technically, we can remove the dell one as it's the "default"
              ;;
      esac
      [[ -z $machine ]] && return #assuming you want it to break if it is not lenovo or dell?
      machine="${machine%"${machine##*[![:space:]]}"}" #Removes Trailing Spaces
      
      echo "Debug found ${machine}";
      
      #############################################
      # Quick hack to find out if the installed OS image is a x86 or x64
      system64="/ntfs/Windows/SysWOW64/regedit.exe" # sloppy detect if 64bit or not
      [[ ! -f $system64 ]] && arch="x86" || arch="x64"
      
      echo "${arch} was detected";
      #############################################
      #this section has been updated to bring the osn names in line
      # with how the Dell CABs are defined
      case $osid in
          5) osn="win7" ;;
          6) osn="win8" ;;
          7) osn="win8.1" ;;
          9) osn="win10" ;;
      esac
      
      #############################################
      dots "Preparing Drivers"
      # below creates local folder on imaged pc
      # this can be anywhere you want just remember
      # to make sure it matches throughout! (case IS important here)
      clientdriverpath="/ntfs/Windows/inf/Drivers"
      remotedriverpath="/images/drivers/$machine/$osn/$arch"
      
      echo "setting client path";
      [[ ! -d $clientdriverpath ]] && mkdir -p "$clientdriverpath" >/dev/null 2>&1
      echo -n "In Progress"
      
      #there's 3 ways you could handle this,
      #driver cab file, extracted driver files or both
      #so on the server put extracted driver files to match below folder tree
      #i.e. Model Latitude E5410, Windows 7 x86 image would be:
      #/fog/Drivers/Latitude E5410/win7/x86
      
      echo "System breakpoint";
      debugPause;
      
      rsync -aqz "$remotedriverpath" "$clientdriverpath" >/dev/null 2>&1
      [[ ! $? -eq 0 ]] && handleError "Failed to download driver information for [$machine/$osn/$arch]"
      
      echo "End driver copy";
      debugPause;
      
      #this next bit adds driver location on pc to devicepath in registry (so sysprep uses it to reference)
      # remember to make devicepath= match the path you've used locally
      #also do not remove %SystemRoot%\inf
      #and to add more locations just use ; in between each location
      
      regfile="/ntfs/Windows/System32/config/SOFTWARE"
      key="\Microsoft\Windows\CurrentVersion\DevicePath"
      devpath="%SystemRoot%\inf;";
      reged -e "$regfile" &>/dev/null <<EOFREG
      ed $key
      $devpath
      q
      y
      EOFREG
      echo -e "\b\b\b\b\b\b\b\b\b\b\b${ceol}Done"; # this just removes "In Progress and replaces it with done :-)"
      
      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by george1421

        @uwpviolator said in Windows 10 Drivers Not Copying:

        What does the files in /images/drivers/OptiPlex 580/win10 look like?

        Remember that case is important to linux.

        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!

        UWPVIOLATORU 1 Reply Last reply Reply Quote 0
        • UWPVIOLATORU
          UWPVIOLATOR
          last edited by UWPVIOLATOR

          0_1513616954032_a4bfd15d-7e38-48a9-aef7-b2af2ce44a2f-image.png

          I am not seeing any difference between my win7 and win10 setup so it leads me to believe it’s the script.

          1 Reply Last reply Reply Quote 0
          • UWPVIOLATORU
            UWPVIOLATOR @george1421
            last edited by

            @george1421

            Here is the ls

            0_1513618506431_59bd5bde-7f50-4d06-89bb-06d21dd9ca24-image.png

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

              @uwpviolator Ok, what does your fog.postdown file look like. There is something that maps the partitions. The older setup for win7 made some assumptions based on Win7.

              Also I’ve been working on an updated tutorial to the original one here: https://forums.fogproject.org/topic/11126/using-fog-postinstall-scripts-for-windows-driver-injection-2017-ed You may want to review it since it was intended to be more towards win10.

              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!

              UWPVIOLATORU 1 Reply Last reply Reply Quote 0
              • UWPVIOLATORU
                UWPVIOLATOR @george1421
                last edited by

                @george1421

                #!/bin/sh
                ## This file serves as a starting point to call your custom postimaging scripts.
                ## <SCRIPTNAME> should be changed to the script you're planning to use.
                ## Syntax of post download scripts are
                #. ${postdownpath}<SCRIPTNAME>
                
                echo "starting postdownload"; 
                
                . /usr/share/fog/lib/funcs.sh
                [[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/"
                case $osid in
                    5|6|7|9)
                        clear
                        [[ ! -d /ntfs ]] && mkdir -p /ntfs
                        getHardDisk
                        if [[ -z $hd ]]; then
                            handleError "Could not find hdd to use"
                        fi
                        getPartitions $hd
                        for part in $parts; do
                            umount /ntfs >/dev/null 2>&1
                            fsTypeSetting "$part"
                            echo  "$part"
                            case $fstype in
                                ntfs)
                                    dots "Testing partition $part"
                                    ntfs-3g -o force,rw $part /ntfs
                                    ntfsstatus="$?"
                                    if [[ ! $ntfsstatus -eq 0 ]]; then
                                        echo "Skipped"
                                        continue
                                    fi
                                    if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
                                        echo "Not found"
                                        umount /ntfs >/dev/null 2>&1
                                        continue
                                    fi
                                    echo "Success"
                                    break
                                    ;;
                                *)
                                    echo " * Partition $part not NTFS filesystem"
                                    ;;
                            esac
                        done
                        if [[ ! $ntfsstatus -eq 0 ]]; then
                            echo "Failed"
                            debugPause
                            handleError "Failed to mount $part ($0)\n    Args: $*"
                        fi
                        echo "Done, fixing to load the drivers"
                        debugPause
                        # . ${postdownpath}fog.log
                        . ${postdownpath}fog.drivers
                        # . ${postdownpath}fog.ad
                        umount /ntfs
                        ;;
                    *)
                        echo "Non-Windows Deployment"
                        debugPause
                        return
                        ;;
                esac
                
                george1421G 1 Reply Last reply Reply Quote 0
                • george1421G
                  george1421 Moderator @UWPVIOLATOR
                  last edited by

                  @uwpviolator Hmmm… that looks OK too.

                  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
                    last edited by

                    rsync -aqz "$remotedriverpath" "$clientdriverpath" >/dev/null 2>&1

                    I might recommend changing the line above to something like:
                    rsync -azP "$remotedriverpath" "$clientdriverpath"

                    This should show progress as well as spit out any errors it may be running into giving you more information to look at.

                    As for the post earlier, where you couldn’t cd to one to the OptiPlex folders, you would need to quote the string or escape the space. This could be something like:
                    cd "OptiPlex 580" or cd OptiPlex\ 580

                    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

                    UWPVIOLATORU 1 Reply Last reply Reply Quote 0
                    • Tom ElliottT
                      Tom Elliott
                      last edited by

                      I’d also suggest, for debugging, echoing the $clientdriverpath and $remotedriverpath variables instead of putting “System breakpoint”; This way you know exactly what the variables are defined as.

                      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

                      UWPVIOLATORU 1 Reply Last reply Reply Quote 0
                      • UWPVIOLATORU
                        UWPVIOLATOR @Tom Elliott
                        last edited by

                        @tom-elliott @george1421

                        So worked with George yesterday on this. Here is what we know and where we left of.
                        Ran Debug
                        Broke out of script after Driver Copy
                        Checked the HD and the x64 folder was there and in it the test .txt file
                        Then sysprep
                        Folder is gone after sysprep

                        So it might be an issue with unattended file. I did not make it it was from our last image which was Win 10 EDU 1609. I am going to upload a blank image with no unattended file and see if the file sticks.

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

                          @uwpviolator You asked yesterday about the unattend.xml file. I started with my win7 config file and it worked for win10. But our config file was very basic. If you need a good starting point you can go to this web site to create a template unattend.xml file. http://windowsafg.no-ip.org/

                          Just don’t put any private information into this configuration. Put generic license keys and such and then hand exit afterwards.

                          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
                          • UWPVIOLATORU
                            UWPVIOLATOR @Tom Elliott
                            last edited by

                            @tom-elliott

                            This

                            echo "System breakpoint";
                            debugPause;
                            
                            rsync -azP "$remotedriverpath" "$clientdriverpath"
                            [[ ! $? -eq 0 ]] && handleError "Failed to download driver information for [$machine/$osn/$arch]"
                            
                            echo "End driver copy";
                            debugPause;```
                            

                            or This

                            echo "System breakpoint";
                            debugPause;
                            
                            rsync -azP "$remotedriverpath" "$clientdriverpath"
                            
                            echo "End driver copy";
                            debugPause;
                            
                            UWPVIOLATORU 1 Reply Last reply Reply Quote 0
                            • UWPVIOLATORU
                              UWPVIOLATOR @UWPVIOLATOR
                              last edited by

                              @george1421 @Tom-Elliott

                              Uploaded fresh image no unattended file. Still no files on HD. See my last reply. Which one do I replace in my fog.drivers file?

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

                                @uwpviolator Well then, I think you might want to change up your fog.drivers script a bit. Right now its working fine for win7 but not win10. So in the first script you posted modify this section of code.

                                #############################################
                                dots "Preparing Drivers"
                                # below creates local folder on imaged pc
                                # this can be anywhere you want just remember
                                # to make sure it matches throughout! (case IS important here)
                                clientdriverpath="/ntfs/Windows/inf/Drivers"
                                remotedriverpath="/images/drivers/$machine/$osn/$arch"
                                

                                to this

                                #############################################
                                dots "Preparing Drivers"
                                # below creates local folder on imaged pc
                                # this can be anywhere you want just remember
                                # to make sure it matches throughout! (case IS important here)
                                if [ $osid -eq 9 ]
                                then
                                    clientdriverpath="/ntfs/Drivers"
                                else
                                    clientdriverpath="/ntfs/Windows/inf/Drivers"
                                fi
                                remotedriverpath="/images/drivers/$machine/$osn/$arch"
                                

                                You might ask, so what will that do for you? The patch tests to see what OS you are deploying. If the OSID==9 then you are deploying a win10 image. In that case it will copy the drivers to C:\Drivers, all other OS’ the drivers will be copied to C:\Windows\Inf\Drivers.

                                Then in your unattend.xml file, tell oobe to look in c:\Drivers for its 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!

                                UWPVIOLATORU 1 Reply Last reply Reply Quote 0
                                • UWPVIOLATORU
                                  UWPVIOLATOR @george1421
                                  last edited by

                                  @george1421

                                  So doing this will not affect Win 7 as it will only copy to C:/drivers if Win 10 correct?

                                  Tom ElliottT 1 Reply Last reply Reply Quote 0
                                  • Tom ElliottT
                                    Tom Elliott @UWPVIOLATOR
                                    last edited by

                                    @uwpviolator Correct.

                                    I’m wondering, however, is the script right to begin with?

                                    I mean, you said the C:\Drivers only had a text file in it if I remember correctly, but based on what @george1421 is showing, It looks like you were copying the files to the windows inf driver store? Sorry not familiar with default structure of windows driver, so maybe I’m off base here.

                                    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

                                    UWPVIOLATORU george1421G 2 Replies Last reply Reply Quote 0
                                    • UWPVIOLATORU
                                      UWPVIOLATOR @Tom Elliott
                                      last edited by

                                      @tom-elliott

                                      Fog Node
                                      /images/drivers/model name/win7/x64
                                      /images/drivers/model name/win10/x64

                                      Fog.drivers
                                      Copies folder to c:/windows/inf/drivers

                                      Works for Win 7. Not for Win 10

                                      Run debug, stop after driver copy. cd to c:/windows/inf/drivers. x64 is there on the HD. When rebooting and going through sysprep is where it seems to be removing that folder. Thought it might be unattended file but just did it with no unattended and still nothing.

                                      So I will make the changes but this might just be something with Win 10 1709?

                                      Tom ElliottT 1 Reply Last reply Reply Quote 0
                                      • george1421G
                                        george1421 Moderator @Tom Elliott
                                        last edited by

                                        @tom-elliott Yes, he was / we were originally promoting to just place the inf files in the inf directory and windows would automagically just see them and use then. It does work that way for Win7 and older releases of win10. It appears the win10 1709 now purges and rebuilds this inf directory when you syspre it. We tested this during debugging. we stopped the master fog script just after driver deployment and confirmed the files where there. Then he rebooted the target computer and checked after oobe and the directory was missing with the test .txt file.

                                        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!

                                        UWPVIOLATORU 1 Reply Last reply Reply Quote 0
                                        • Tom ElliottT
                                          Tom Elliott @UWPVIOLATOR
                                          last edited by Tom Elliott

                                          @uwpviolator I’m going to guess. The fact that you state it works for windows 7 kind of proves this is outside of something fog is actually doing. Not that we don’t want to help (I think you’re aware of this already), but we can’t fix other people’s “mishaps”. All we can do is provide, hopeful, workarounds.

                                          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

                                          1 Reply Last reply Reply Quote 1
                                          • UWPVIOLATORU
                                            UWPVIOLATOR @george1421
                                            last edited by

                                            @george1421 @Tom-Elliott

                                            Yes, I have tested and adding the lines of code fixed it. It now dropps the files to C:/Drivers which is not wiped out. Now I need to update unattend file to reflect this change.

                                            #############################################
                                            dots "Preparing Drivers"
                                            # below creates local folder on imaged pc
                                            # this can be anywhere you want just remember
                                            # to make sure it matches throughout! (case IS important here)
                                            if [ $osid -eq 9 ]
                                            then
                                                clientdriverpath="/ntfs/Drivers"
                                            else
                                                clientdriverpath="/ntfs/Windows/inf/Drivers"
                                            fi
                                            remotedriverpath="/images/drivers/$machine/$osn/$arch"```
                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            209

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project