|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
− | Overview: The Auto Driver install script is an addition for FOG that allows you to build a hardware independent Windows 7 image. Devices on the system will be detected by FOG, and drivers inserted into C:\Drivers from a repository on the FOG server. Windows will then use that as an additional driver search path when doing Sysprep first run.
| + | Please see [https://forums.fogproject.org/topic/8889/fog-post-install-script-for-win-driver-injection?page=1 https://forums.fogproject.org/topic/8889/fog-post-install-script-for-win-driver-injection?page=1] |
− | | |
− | Why do this? When you're managing thousands of machines from a variety of models with differing driver requirements making a single image that has everything you need is nearly impossible. In the past we would make images specific to each model of computer, but it means that we maintained about 10 different images. That means that updating the image was a lot of work, and simply didn't get done very often. By separating the image from the drivers, you gain a lot of flexibility, and can respond to changes very quickly.
| |
− | | |
− | For example, let's say a new model of desktop comes your way. With this system, all you do is image it once as is, take a look at Device manager to see what drivers it needs, and then place those drivers on the FOG server. Now all machines with the same hardware will have the drivers installed during the sysprep process. Another common scenario is that some machines have a special card added to them. Maybe it's a video card, or firewire card. Rather than building a new image, or multiple new images, simply include the driver, and any system with that card present will pull it post imaging.
| |
− | | |
− | ==Setup Repository==
| |
− | *Create a folder inside of /images named drivers
| |
− | mkdir /images/drivers
| |
− | *Create a Common folder for drivers/scripts you want on all systems.
| |
− | mkdir /images/drivers/Common
| |
− | *Create a SetupComplete.cmd file. (See: http://technet.microsoft.com/en-ca/library/cc766314%28v=ws.10%29.aspx)
| |
− | *This is a script, that when copied to C:\Windows\Setup\Scripts is executed at the end of the SysPrep process. The Frontier script stops the FOG service, runs a netsh command to push out a wlan profile, deletes the profile xml file, the sysprep.xml and fixes the permissions on the C:\drivers folder. It's a quite useful tool to use. I recommend at least having:
| |
− | net STOP "Fog Service"
| |
− | start "Reset C:\Drivers Perms" /wait "icacls" C:\drivers /reset /T >>"C:\FOGDrivers.log" 2>&1
| |
− | | |
− | ===Adding Windows Device Drivers===
| |
− | *The script currently detects three categories of Drivers: PCI, USB & ACPI.
| |
− | *The first step is to identify the device that you want to install. On an imaged Windows 7 machine, go to device Manager.
| |
− | **Right click the device, and go to Properties.
| |
− | **Click the details tab, and go to the Hardware IDs dropdown.
| |
− | **You'll see something like PCI\VEN_XXXX&Dev_YYYY&SUBSYS_ZZZZ.... or USB\VID_XXXX&PID_YYYY or ACPI\XXXXXXXXX
| |
− | ***You take the driver for that device, and place it in a folder of /images/drivers/XXXX/YYYY.
| |
− | For Example, a driver for Intel Video with a device ID of PCI\VEN_8086&DEV_5A3C would be in the folder /images/drivers/8086/5a3c **Note that it's lower case.
| |
− | ***In the case of a drivers that contains drivers for multiple devices (Ie: Chipset) you don't need to break out each individual device. You can simply make the folder match one of the devices.
| |
− | ***ACPI devices don't have a vendor/ID value, but only contain a single value. ACPI/PNP devices should be placed in /images/pnp/XXXXXX.
| |
− | For Example, a driver for the Dell Freefall sensor is ACPI\SMO8810 in Device Manager. Place the driver in /images/drivers/pnp/SMO8810.
| |
− | ***Some devices you need to get the ID information from Last Known Parent in device manager. For example, some sound cards have HDAUDIO\..... as the device ID. The Last Known Parent contains the VEN/DEV you need to use.
| |
− | | |
− | *Tip for keeping driver folders reasonably sized: Very often drivers are bloated and come with a lot more than what Windows minimally needs to get the device working. Often there's an executable that installs a tray application, etc. As for the actual driver, it's often found inside of a subfolder like \Win7\driver\x64. When adding a driver, you can usually just grab the subfolder that contains the files you need. You can test this by putting that folder on a USB stick, and going to a system that's missing the driver. In Device Manager, point to the folder and see if it will update successfully. ("Real" driver folders contain .inf, .cat, .sys, .man files)
| |
− | | |
− | ===Adding Silent Install drivers=== | |
− | *Drivers that require an executable to be run can also be included in this method provided the driver has a silent install option with no user interaction.
| |
− | *If there is a drvinstall.bat file inside the driver folder, the script will take the contents of the bat file and add it to the end of the SetupComplete.cmd file to be executed at the end of the sysprep process. See the example contents of:
| |
− | echo Driver for SMO8810
| |
− | start/wait C:\drivers\pnp\SMO8810\setup.exe /s
| |
− | *This is handy for devices that aren't detected by Device Manager's Update Driver. Devices that operate this way for us have been some sound cards, freefall sensors, touchscreen calibration tools, etc.
| |
− | | |
− | ==Install Script==
| |
− | *There are two files you'll need to add to /images/postdownloadscripts/
| |
− | *machinedrivers.sh [[File:machinedrivers.txt]]
| |
− | *And driverinstall.sh http://www.fogproject.org/wiki/images/e/e5/Driverinstall.txt
| |
− | *Save them to /images/postdownloadscripts and change the extension to .sh
| |
− | *Make them executable with
| |
− | chmod a+x *.sh
| |
− | *Finally, edit the fog.postdownload file and the following to the end of the file:
| |
− | ${postdownpath}/driverinstall.sh
| |
− | | |
− | ==Building the Universal Image==
| |
− | *The script requires a sysprepped Windows 7 image to work. If you're not using Sysprep, this process won't work.
| |
− | *Include driver search path to C:\Drivers (See: http://technet.microsoft.com/en-ca/library/cc753716.aspx)
| |
− | | |
− | ==Notes for Andrew Single== | |
− | In Progress: Documentation for adding the Auto Driver install script from Frontier School Division.
| |
− | Script To Do:
| |
− | *Make device ID's all lower case so PNP devices don't require upper case folder names & are consistent with all lower case.
| |