Setting up Windows Deployment services environment part 2

by Mats Hellman on 09.Jul, 2009 under Windows, Windows Deployment

Well it’s been a while now since I wrote the first article on this topic. I’m really sorry this blog has been quiet for quite some time now. The reason is quite simple. The early morning of May 11 I got the privilege to watch the birth of my daughter. Since that day everything else has been on a second place and not really important. I’ve returned from my father leave now so I’ll try to get the articles coming in a normal timetable again. Once again, sorry about the delay but the follow-up articles are being written right now.

In the last article we installed Windows Automated installation toolkit on the technician computer and setup a master installation and we used sysprep to prepare the computer for imagex.

In this article

We will create a WinPE image we can use imagex from to create and deploy our image to the Windows Deployment server. We will also modify our WinPE image to contain the drivers we need. Remember the latest WinPE is basically Windows Vista so when you download the drivers take that in consideration.

First of all download and extract the drivers you need. Make note on where your .inf files are located.

Using the WinPE command prompt

Since we already have our master installation it’s now time to start creating a WinPE CD to use for capture. If you want to save the image directly to your WDS server you need to include the network drivers in this image also.

Start up your WinPE command prompt. First and foremost we need to get an working PE directory so running the command

Updating path to include peimg, cdimage, imagex

C:\Program Files\Windows AIK\Tools\PETools\
C:\Program Files\Windows AIK\Tools\PETools\..\x86
C:\Program Files\Windows AIK\Tools\PETools>copype.cmd x86 c:\winpe_x86
=================================================== Creating Windows PE customization working directory c:\winpe_x86 ===================================================

1 file(s) copied.
1 file(s) copied.
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\bcd
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\boot.sdi
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\bootfix.bin
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\etfsboot.com
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\fonts\chs_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\fonts\cht_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\fonts\jpn_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\fonts\kor_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\boot\fonts\wgl4_boot.ttf
9 File(s) copied
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\bcd
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\fonts\chs_boot .ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\fonts\cht_boot .ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\fonts\jpn_boot .ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\fonts\kor_boot .ttf
C:\Program Files\Windows AIK\Tools\PETools\x86\EFI\microsoft\boot\fonts\wgl4_boo t.ttf
6 File(s) copied
1 file(s) copied.
1 file(s) copied.
Success Updating path to include peimg, cdimage, imagex
C:\Program Files\Windows AIK\Tools\PETools\ C:\Program Files\Windows AIK\Tools\PETools\..\x86

C:\winpe_x86>

Now that we have an PE folder on the drive we can modify it to contain programs we need. Like ImageX.

C:\winpe_x86>copy "C:\Program Files\Windows AIK\Tools\x86\imagex.exe" c:\winpe_x86\ISO\
        1 file(s) copied.

C:\winpe_x86>

Adding drivers to WinPE 2

Before creating the ISO image we can burn we need to add the drivers we need to the WIM image. You have your drivers downloaded right? If you need a network connection you’ll have to provide the network drivers. Note that you really don’t have to use the network, you can import the image to the master installation computers hard drive also and after you boot it up move it across the network (I use this if I forget to add drivers). Anyway this is how you add the drivers.

First of all let’s say, for simplicity, that your network drivers .inf files are located in C:\Drivers\Network\WinALL\ and your WinPE .wim image as above in C:\WinPE_X86\winpe.wim. What you need to do first of all is mount the wim image to get it in read/write state so here is how you do it

C:\Program Files\Windows AIK\Tools\PETools>imagex /mountrw c:\WinPE_X86\winpe.wim 2 C:\winpe_x86\mount
C:\Program Files\Windows AIK\Tools\PETools>peimg /inf="C:\Drivers\Network\Winall\*.inf" c:\winpe_x86\mount
C:\Program Files\Windows AIK\Tools\PETools>imagex /unmount /commit C:\winpe_x86\mount

To explain what’s going on above

  1. Mount the wim image read/write to the mount folder in C:\winpe_x86
  2. Use peimg to add the needed network drivers ( you can continue with chipsets a.s.o if you need to )
  3. unmount the wim image and commit the changes made.

Once that’s done we need to create our ISO image. So back to the terminal and run the following to create a ISO file using the winpe.wim and the content of the ISO folder.

C:\Program Files\Windows AIK\Tools\PETools>oscdimg -n -bc:\winpe_x86\etfsboot.co
m c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso

OSCDIMG 2.54 CD-ROM and DVD-ROM Premastering Utility
Copyright (C) Microsoft, 1993-2007. All rights reserved.
Licensed only for producing Microsoft authorized content.

Scanning source tree
Scanning source tree complete (18 files in 8 directories)

Computing directory information complete

Image file is 211216384 bytes

Writing 18 files in 8 directories to c:\winpe_x86\winpe_x86.iso

100% complete

Final image file is 211216384 bytes

Done.

C:\Program Files\Windows AIK\Tools\PETools>

Now you have a ISO file you can burn to a CD and boot from, the CD contains ImageX and the necessary drivers.

Follow Up

What we have done in this article is creating an WinPE 2 disk to use for capture, we added some drivers for networking and possibly chipsets to our image so it will recognize the hardware.

In the next article of this series we will capture our master image and import it to Windows Deployment server. Hope to see you next week when the series continues.

Leave a comment