Friday, May 18, 2007

Adding drivers to a Windows PE Image

Supposing you have a server or machine with newer hardware that is not supported by default. You need drivers. Well there is hope without having to create a new image.

First you will need to disable the image in WDS and mount the image using ImageX. You must then figure out the image index of the image you wish to mount. This is usually a 1 or a 2. Open a command prompt,

type: imagex /info {imagepath/Imagename.wim}

Note the Index Number

type: imagex /mountrw {imagepath/Imagename.wim} 2 {mountfolder}

Now you have your image mounted and can modify as needed. In the case of a specific driver you will need the .inf file as well as any tied to it. You will need to have the Windows Automated Installation Kit installed (preferably on your WDS box) and you will need to launch the Windows PE Tools Command Prompt which is already a shortcut in your start menu once AIK is installed. Once at the command prompt you will use the PEIMG command to load the driver.

Type: peimg /inf={path to driver} {image mount point}

(ex: peimg /inf=c:\broadcom\drivers\be086.inf c:\winpeimg\mount\)

Now you must unmount your image using ImageX and commit changes.

Type: imagex /unmount /commit {image mount point}

Re-enable your Image and restart the WDS service and you shouldn't have a problem. This worked in a case where I had a Dell PE2950 server with the new NetExtremeII TCP/OE network adapter which Windows 2003 does not have built-in drivers for. My problem was I could boot into the WinPE environment but got network driver error messages afterward. I used the above method to add the drivers to the image and the next time I tried it worked like a charm.