Adding Drivers to Boot
and Discover Images
Windows Server 2008 R2
WDS supports adding drivers to Windows Server 2008 R2 and Window 7 boot
images from within the WDS console. This also includes any Windows
Server 2008 R2 or Windows 7 discover and capture images that are loaded
as boot images on a WDS system. For all other boot, discover images, and
capture images, drivers will need to be injected manually to the WIM
file using the tools in the Windows Automated Installation Kit. To add
drivers into a Windows Server 2008 R2 WDS infrastructure into a Windows
Server 2008 R2 or Windows 7 boot image, perform the steps detailed in
the following sections.
Adding Drivers to the
WDS Server Console
When drivers need to be added to
Windows 7 or Windows Server 2008 R2 boot images, they can be installed
using the WDS console by performing the following steps:
1. | Log on to
the Windows Server 2008 R2 system that has the WDS role installed with
an account with local administrator and domain administrator rights.
| 2. | Download the appropriate drivers and save the drivers
to a folder on WDS server or a network location. Expand the drivers
download to reveal the folder that contains the necessary INF, SYS, and
other files that are required for the particular driver and note the
exact location.
| 3. | On the
WDS server, click Start, click All Programs, click Administrative Tools,
and select Windows Deployment Services.
| 4. | When the Windows Deployment Services console opens, in
the tree pane, select and expand the WDS server.
| 5. | Right-click the Drivers node and select Add Driver
Package.
| 6. | On the
Driver Package Location page, select the Select Driver from an .inf File
option button.
| 7. | In the
Location Form field, click the Browse button and browse to the folder
that contains the drivers INF, SYS, and other files. Once back on the
Driver Package Location page, click Next to continue.
| 8. | On the Available Driver Packages page, check or uncheck
the desired drivers that will be added to the WDS server and click Next
to continue. Many drivers are packaged together and the driver file may
include many different drivers. As a best practice, limit the drivers
added to the WDS server and the boot images to only the necessary
drivers and no more to avoid unnecessary driver conflicts or file size
bloat.
| 9. | Review the
selections on the Summary page and click Next to continue.
| 10. | On the Task Progress page, once the driver(s) are
added, click Next to continue.
| 11. | On the Drivers Group page, if a driver group exists, the
driver can be added to the group; otherwise, a new driver group can be
created or the driver can be added to the root without creating a group.
Select the desired option button, enter or select the driver group,
and/or click Next to continue.
| 12. | On the Task Completed page, click Finish to complete the
driver addition.
|
Adding Drivers to
Windows 7 and Windows Server 2008 R2 Boot Images Using the WDS Console
If drivers need to be added to
existing Windows 7 or Windows Server 2008 R2 boot images on a Windows
Server 2008 R2 WDS server, they can be added using the WDS console. The
drivers will need to be added to the WDS server as detailed in the
previous section before performing the following steps. To add drivers
from the WDS server to existing Windows 7 and/or Windows Server 2008 R2
boot images, perform the following steps:
1. | Log on to
the Windows Server 2008 R2 system that has the WDS role installed with
an account with local administrator and domain administrator rights.
| 2. | On the WDS server, click Start, click All Programs,
click Administrative Tools, and select Windows Deployment Services.
| 3. | When the Windows Deployment Services console opens, in
the tree pane, select and expand the WDS server.
| 4. | Select and expand the Boot Images node and in the tasks
pane select the desired boot image.
| 5. | If you do not have a copy
of the existing boot image, it is a good idea to back it up by
right-clicking on the boot image, selecting Export Image, and following
the steps to make a copy/export of the boot image before any drivers are
added to the image.
| 6. | Once a backup of the boot image is copied, right-click
the desired boot image and select Add Driver Packages to Image.
| 7. | Click Next on the Before You Begin page if you have a
good backup of the boot image; otherwise, click Cancel.
| 8. | On the Select Driver Packages page, click the Search
for Packages button to list all compatible packages for this boot image.
Check any desired drivers listed in the Search Results section, uncheck
any drivers that should not be added to the boot image, and click Next
to continue.
| 9. | On the
Selected Driver Packages page, review the list of drivers that will be
added to the boot image, and click Next to continue.
| 10. | On the Operation Complete page, review the results and
click Finish to complete the driver addition to the boot image.
| 11. | Repeat this process for any other Windows Server 2008
R2 or Windows 7 boot images that need drivers added, close the WDS
console, and log off the server when completed.
| 12. | Now boot up a WDS client using this boot image and
verify that the driver is working correctly.
|
Manual Driver Injection
for Windows 7 and Windows Server 2008 R2 Boot Images
In situations where a WDS
server is not available or not implemented, administrators might still
want to add drivers to boot images to create custom installation media
with the necessary drivers. When this is the case, the Windows Automated
Installation Kit should be used. To inject drivers into a Windows 7 or
Windows Server 2008 R2 boot image, perform the following steps:
1. | Download
the necessary drivers and the WAIK from the Internet to a local server.
| 2. | Log on to a Windows 7 or Windows Server 2008 R2 system
with an account with administrator group membership and create a folder
called C:\MountImage. Substitute C for a drive letter with ample space
to mount the boot image but a few gigabytes of free space should
suffice.
| 3. | Install
the WAIK on the system in the default folder location.
| 4. | Copy the desired drivers to the system. Make sure the
driver files have been expanded and the folder containing the INF, SYS,
and other necessary driver files can be located through Windows Explorer
on the local machine.
| 5. | Copy the Windows 7 or Windows Server 2008 R2 boot.wim
from the installation media to the system on a local drive that can be
located through Windows Explorer. Browse to the file location,
right-click on the file, and select Properties. Uncheck the read-only
attribute and click OK to save the setting.
For our example, the Windows 7 x86 boot.wim will be located in
the C:\Win7Boot\ folder and the network card driver we will add is
located in the C:\Drivers\NIC\Win7\32\ folder. When viewed, this folder
contains an INF, SYS, and CAT file that make up the driver set.
| 6. | On the system, open a command prompt. Change
directories to the C:\Program Files\Windows AIK\Tools\x86 folder. If the
boot image that will be modified is an x64-based image, the amd64
folder would be substituted for the x86 folder in our example.
| 7. | Based on the location of our drivers and boot image,
type in the command DISM /Get-Wiminfo /Wimfile:C:\Win7Boot\Boot.wim
and press Enter.
| 8. | The
previous command lists the information about the boot.wim file
and specifically shows that this Windows 7 x86 boot.wim file
contains two images, Microsoft Windows PE (Image Index 1) and Microsoft
Windows Setup (Image Index 2). We will be mounting and adding drivers to
the Image Index 2. This info step should be run on each boot image file
that will have drivers added to ensure that the correct image index
number is referenced when the file is mounted.
| 9. | In the Command Prompt window, type the command DISM
/Mount-Wim /WimFile:C:\Win7Boot\boot.wim /Index:2
/MountDir:C:\MountImage and press Enter to mount the boot image
file.
| 10. | If the
process is successful, the command prompt will state that the operation
completed successfully.
| 11. | In the Command Prompt window, type the command DISM
/Image:C:\MountImage /Add-Driver:C:\Drivers\NIC\Win7\32 and press
Enter.
| 12. | If the
driver addition completes successfully, enter the command DISM
/Unmount-Wim /MountDir:C:\MountImage /Commit and press Enter to
save the changes back to the boot.wim file. The results will
show in the Command Prompt window, as shown in Figure 3.
| 13. | Copy the
updated boot.wim file to the WDS server, add it as a boot
image, and test the image to verify the driver addition was successful.
|
Manual Driver Injection
for Windows Vista, WinPE, and Windows Server 2008 Boot Images
There might be situations when
WDS administrators need to use a boot image other than a Windows 7 or
Windows Server 2008 R2 boot image, and drivers need to be added to these
images. In these cases, it is necessary to add or inject those drivers
manually to the WIM files. This can be accomplished using the tools
included in the Windows Automated Installation Kit (WAIK) for Windows
Vista and Windows Server 2008. The WAIK for Windows 7 and Windows Server
2008 R2 does not support injecting drivers to boot images from Windows
Vista. To manually inject drivers into a Vista boot image, as an
example, perform the following steps:
1. | Download
the necessary drivers and the Windows Vista WAIK from the Internet to a
local server.
| 2. | Log on to
a system with an account with administrator group membership and follow
the steps noted in the previous section to copy the drivers and boot.wim
file, and create a folder to mount the image into. | 3. | Install the Windows Vista WAIK on the system.
For our example, the Windows Vista SP2 x86 boot.wim will be
located in the C:\VistaBoot\boot.wim and the network card
driver we will add is located in the E:\Drivers\NIC\WinVista\32\ folder.
When viewed, this folder contains an INF, SYS, and CAT file that make
up the driver set. The image will be mounted in a newly created folder
named C:\MountImage.
| 4. | On the system, open a command prompt. Change directories
to the C:\Program Files\Windows AIK\Tools\x86 folder. If the boot image
that will be modified is an x64-based image, the amd64 Tools subfolder
would be substituted for the x86 folder in our example.
| 5. | Based on the location of our drivers and boot image,
type in the command IMAGEX /info C:\VistaBoot\boot.wim and
press Enter. Make sure this boot.wim
file is not set to read
only. | 6. | The
previous command lists the information about the boot.wim file
and specifically shows that this Vista x86 SP2 boot.wim file
contains two images, Windows Longhorn WinPE (Image Index 1) and Windows
Longhorn Setup (Image Index 2). We will be mounting and adding drivers
to the Image Index 2. This info step should be run on each boot image
file that will have drivers added to ensure that the correct image index
number is referenced when the file is mounted.
| 7. | In the Command Prompt window, type the command IMAGEX
/Mountrw C:\Vistaboot\boot.wim 2 C:\MountImage and press Enter to
mount the boot image file.
| 8. | If the process is successful, the command prompt will
state that the operation completed successfully.
| 9. | In the Command Prompt window, type the command PEIMG/Inf=C:\Drivers\NIC\WinVista\32\netrtx32.inf
C:\MountImage\Windows and press Enter. Also, make sure to
substitute the correct INF file that is located in the driver folder.
| 10. | If the process completes successfully, type the command
IMAGEX /Unmount /Commit C:\MountImage and press Enter.
| 11. | Save the updated boot.wim to the necessary WDS
server and install as a boot image if desired. |
|