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

Finding drivers for unrecognized hardware in a Windows system

by Mats Hellman on 24.Mar, 2009 under Windows

Sometimes when you finish installing your Windows operating system you are missing drivers. The easy ones like chipset,network and graphics are easy to find, but what about the rest? Below is a screenshot of the details on the Intel Gigabit network card. Nothing special there, it’s installed and it’s working fine.

image

If Windows wouldn’t be able to find drivers for it the Details pane would still be visible and you would se the Device Instance Id. From that one line we can get everything we need. So let’s try it out.

In the beginning of the line PCI\VEN_8086&DEV_10BD&SUBSYS…. VEN stands for the Vendor, this being Intel and DEV for the device in question. So now that we know this much just head over to pcidatabase.com and enter the DEV id 10BD into the device search.

image

Voila. As you can se we now have both the vendor and the device. Now just head over to the vendor website to get your drivers. If you think this is a mess and don’t want to do it the hard way there are software’s doing the exact same thing, but it’s always good to know how to search for them yourself and where to find the information in case you need it.

As a last note, this was made on a Windows XP Professional desktop but the same system applies to Vista and the Server operating systems.

7 comments

Setting up a Windows Deployment Services environment

by Mats Hellman on 23.Mar, 2009 under Windows, Windows Deployment, XP Professional

Windows deployment services was released to replace the old Windows RIP. Windows Deployment Services (WDS) makes it easier for us to deploy Windows Vista or even Windows XP using images. In this article I will go trough some of the steps I had to do to get everything up and working. For someone using Microsoft only environment this should be a very straightforward process but we run DHCP on Linux servers and have quite a mixed environment so there where some things to consider.

What you need

- Technician computer (your desktop/laptop)
- Master computer (the computer from which the image will be captured)
- Client computer (In the example this is the same as the master computer)
- Windows Deployment services configured and running on a server.
- DHCP server in the network.

First of all install Windows Automated Installation Toolkit to your technician computer. You will need it to modify the WindowsPE image we use to capture the .wim image.

 

Creating and imaging an Master Installation

First and foremost you need to have a Master installation. This will be the starting point for any of the deployments you will do so think carefully about what you want to install on this machine. Because we still deploy Windows XP Professional 32-bit this is what this article will cover. At some point I will make a Vista image article but let’s save it for later as the process is almost the same.

Things I want to install are Microsoft Office and programs that we don’t deploy normally trough group policies or other central management systems. I also like to change the OEM information on our installations, like adding the company logo at the Computer information page and information on how to get in contact with our support. So if you have a logo in some format save it as oemlogo.bmp and create oeminfo.ini file. In the oeminfo.ini add the following lines

[general]
Manufacturer=Your Company name
[Support Information]
Line1=For technical support call
Line2=123-456-789
Line3=http://www.nixadmins.net/

Of course change the settings to match your own company. Done customizing? Let’s get on to generalizing the computer.

Using Sysprep to prepare the computer to be imaged.

To remove anything that identifies this computer we need to run sysprep on it. If you are installing Windows XP Professional Service Pack 3 from your Volume License media slip it in and go to SupportTools. In the folder you’ll find Deploy.cab. Extract sysprep.exe,setupcl.exe to C:Sysprep. Also copy the I386 folder from the CD to C:I386, we will need it if we want any kind of regional settings applied to the installation. While we are at it extract the setupmgr.exe to your technician computer, this step is optional but it speeds up creating the Sysprep.inf file quite a bit. Done?

Start up setupmgr.exe on your Technician Computer and select Create New and Sysprep setup file, select Windows XP Professional. Select fully automated and start filling in blanks, fill in the local administrator password also, you can encrypt it and the sysprep folder will be deleted from the target computer once the image is done. We won’t make this installation fully automated (even if we chose that option, but you still can) because I want to keep our company naming policy on the computers. So after filling in your volume license key and owner information save the sysprep.inf file somewhere and open it for editing.  Your file should look something like this.

;SetupMgrTag
[Unattended]
    OemSkipEula = Yes
    DriverSigningPolicy=Ignore
    ExtendOemPartition=1
    InstallFilesPath=C:i386
    TargetPath=WINDOWS

[GuiUnattended]
    AdminPassword=A lot of bla bla.
    AutoLogon=Yes
    AutoLogonCount=3
    OemSkipRegional=1
    OemSkipWelcome=1
    TimeZone=125
    EncryptedAdminPassword=Yes

[UserData]
    OrgName=”Your company name”
    ProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
    FullName=”IT Department”
    ;ComputerName=* ;<- Notice I commented this line out to make the Mini installer ask for a computer name. 

[RegionalSettings]
    LanguageGroup=1
    Language=0000081d

[Sysprep]
    BuildMassStorageSection=Yes

[TapiLocation]
    CountryCode=358
    Dialing=Tone
    AreaCode=09

[Branding]
    BrandIEUsingUnattended=Yes

[Proxy]
    Proxy_Enable=0
    Use_Same_Proxy=0

[Identification]
    JoinDomain=domain.com

[Networking]
    InstallDefaultComponents=Yes

Compare your file with the one above. That’s how it should look like. After you are done with the file copy it over to the same folder you placed sysprep.exe on the master installation. Which should be in C:Sysprep. Once that is done let’s prepare the computer for ImageX.

Open the command line (cmd.exe) and go to the C:sysprep folder. In the folder run

sysprep.exe –mini –reseal

. The switch mini stands for mini setup which will be called once the computer reboots, it will use the sysprep.inf file to fill in as many of the blanks as possible. So if you are using a file like mine it should ask only for a computer name. The reseal switch clears Event Viewer and prepares the computer for delivery, it also sets the mini setup to start at boot up. Once Sysprep is done the computer will shutdown.

Follow up

So what have we done so far?

- Set up the Technician computer with Windows Automated Installation toolkit and setupmgr.exe.

- Created a master installation to use as a base for our future images.

- Used sysprep to prepare the computer for ImageX.

In the next article I’ll go trough setting up a custom WinPE image to use to capture our current master installation using ImageX and using it to capture the .wim image to our Windows Deployment server. So I hope to see you in a few days once the next part of this article is done.

4 comments

Windows XP refusing to install updates after Service Pack 3 installation

by Mats Hellman on 13.Oct, 2008 under Windows

I found some workstations to refuse updating after installing Service Pack 3. After some research I found some information that suggested it was a problem when SP 3 installed the new Windows Update service.

The problem seams to be that SP 3 doesn’t register the dll wups2.dll. Luckily it doesn’t take long or even a reboot to get everything up and running again. Just follow the few simple steps bellow

C:\net stop wuauserv
The Automatic Updates service is stopping.
The Automatic Updates service was stopped successfully.
C:\cd windows\system32
C:\Windows\System32>regsvr32 wups2.dll

Running regsvr32 should result in

regsvr32

After running it don’t forget to start Automatic Update Service again

C:\net start wuauserv
The Automatic Updates service is starting.
The Automatic Updates service was started successfully.

Now go back to updating and everything should be working fine again. If you run into any problems feel free to comment and I’ll do my best to help you out.

Leave a comment