Windows 10 Drivers Not Copying



  • 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 :-)"
    


  • @uwpviolator Yep, I sure am calling the unattend. I’m imaging the same way I have been for a while.

    Would you be able to sanitize your unattend and provide, and I’ll do a line by line? As stated, my Unattend hasn’t really been updated since hte Win7 days, so I’d love to see a modern one that is known working…



  • @bob-henderson I have done this with 1709 and it worked just fine. Review your unattended file or create a test one with just the driver location changed to C:\drivers.

    Is everything else working in your unattended file or working at all? Are you actually calling Sysprep to use your unattended file?



  • @uwpviolator Actually, I think George is right. To test this and make sure it’s none of my scripts that are acting up, I actually dumped the drivers in the C:/Driers folder prior to capture, and then sysprepped with hte info. So eve nwith the files there 100%, windows doesn’t see them and goes on it’s own merry way.

    I’m with @george1421 on this one, 1709 is doing something dumb again. Honestly, I think they are trying to push us more and more to MDT/WDS…or for them, SCCM.



  • @george1421 @Bob-Henderson

    George, I think Bob is skipping over the editing of the FOG Scripts. Bob, if you have made the changes to unattended that still does nothing to tell FOG to drop your driver folder into C:\Drivers. See the following reply.

    @george1421 said in Windows 10 Drivers Not Copying:

    @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.


  • Moderator

    @bob-henderson

    Only thinking out loud at the moment…
    We may have to go the route of installing the Dell WinPE 10 drivers cab into the reference image and then in the target computer using either dism or pnputil to force load the drivers during setupcomplete.cmd. The dell winpe drivers (even if you are not using dell hardware) will give the target system enough drivers to complete OOBE where the actual drivers can be injected during setup complete.

    I simply haven’t had to time to work on our 1709 image internally so I can only guess at this time.



  • @george1421 That’s probably it. It’s a 1709 image, as we’re always pushing the latest and greatest for whatever reason. I’m sure they’ve made it more difficult to get your drivers from anywhere but Windows Update…


  • Moderator

    @bob-henderson Now I can say this use to work. I have not tested it with 1709 yet. 1709 is very different (internally) than 1703. As they said, “Windows 10 will be the last version of windows you will ever need”.



  • @george1421 See, that’s the issue. I have that right after OOBE, as you can see below, and it still doesn’t pull. Weird huh?
    0_1516030895985_snip3.PNG


  • Moderator

    @bob-henderson I can’t share my (our) unattend.xml file with you because of a NDA agreement, but I can show you where the section goes.

    0_1516029910798_win10_snippet.png



  • @george1421 Yep, I’ve found that before numerous times. My problem is mostly ignorance of not knowing how the Unattend.xml is built, so I don’t know where to put that. Hence asking if someone had a sanitized one they’d be willing to share, so I can see the layout and go.

    I’ve used the generators, as well as my existing Win10/Win7 ones, but still don’t really know where to put it.

    Thanks!


  • Moderator



  • @uwpviolator Could you share how you got OOBE to point to the drivers folder? I’m in the same boat you are, and have yet to figure out how to edit my Unattend to look in C:\Drivers for Win10

    Even better, if you could share your unattend with the critical data ripped out, I’d love to see it.



  • @Tom-Elliott @george1421 you guys can make this as resolved. Thanks



  • @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"```

  • Senior Developer

    @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.


  • Moderator

    @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.



  • @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?


  • Senior Developer

    @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.



  • @george1421

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


Log in to reply
 

442
Online

39.8k
Users

11.2k
Topics

106.8k
Posts

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