Delan Azabani

Network installing Windows XP

This was originally going to be a quick guide to Windows Deployment Services with Windows Server 2012. Using it to install Windows Vista and newer is trivial though, with the introduction of the WIM format. However, upon finding a laptop that needed Windows XP and could only externally boot via PXE, things changed a little.

It's obligatory for me to remind you that as this is published, Windows XP will die in just over two months' time, so you shouldn't use it unless absolutely necessary. Nevertheless it's not completely terrible; it even has decent IPv6 support up its sleeve, while striking the careful balance of good support for programs from the 16-bit to modern eras.

The trouble started when I acquired a Toshiba Tecra M2 with a faulty optical drive. To make things worse, it's too old to support USB boot. To really rub in the salt, it supports SD card boot, but only via floppy emulation of a file you place in the FAT filesystem root named $TOSFD00.VFD. I have no idea what they were thinking.

While from Vista onwards it's simply a case of having WDS and dropping in the WIM file, installing Windows XP is full of pitfalls that took me a great deal of poring over the Microsoft Knowledge Base and a variety of forums to decipher. Hopefully this will help someone avoid the same adventure, to put it nicely.

Essentially, the process involves creating a model installation of Windows XP, which is then captured into a WIM file by booting the capture image, then deployed in a similar way to how Windows Vista or later would be deployed.

Configuration notes

The simplest configuration is to have Windows Server 2012 on a physical machine while the model installation is generated in a virtual machine running on the server. This is the layout that will be used for this guide, but others may be useful if for instance, you don't have access to a spare computer or network.

One such alternative configuration is having both the server and the model installation as virtual machines on one host; this may require the use of a virtual network facility in your virtualisation software, so that both virtual machines are connected to one another in one isolated network.

This guide also assumes the use of VMware Workstation 10; Microsoft Virtual PC and Oracle VM VirtualBox probably work as well, but to use the latter, make sure the Extension Pack is installed or PXE booting WDS images will fail. Also, Windows Deployment Services has been available since Windows Server 2003 with SP2, so you could probably use an older version of Windows Server, although I haven't tested it.

Prerequisites

The boot.wim serves the dual role of being the installer for the completed XP image as well as being used to capture the model XP installation. Beware of the Windows XP media; unlike newer version of Windows, there are different media for OEM, Retail and Volume Licensing keys, and each are mutually incompatible by only accepting their specific class of keys.

Preparing the server

Estimated time: 20 minutes

Choose a wired network interface for use with the target computer, and assign it a static IP address, for example 192.168.123.1/24. This is the address that will be used for the rest of this guide. Add the DHCP Server and Windows Deployment Services roles.

Ensure that the DHCP server is running and add two scopes, one listening for the target on 192.168.123.0/24, and one listening for the VM on the subnet chosen by VMware in its default host-only network interface. Of course, leave out the first address from both ranges, as they're already taken. Leave all other settings alone, and activate the scopes.

Start the Windows Deployment Services Configuration Wizard and select Standalone server. The wizard should detect that the DHCP server has been configured and started, and should automatically check both the Do not listen and Configure DHCP checkboxes. If these are not both checked, then the DHCP server is either not configured or is not running; if so, cancel the wizard and fix that first.

Later in the same wizard, select Respond to all clients, and finish the wizard. There is a chance the wizard will say that the service didn't respond in a timely fashion. If this occurs, right click the server and start the service manually.

Finally, create an image group in the install images section, ready to later receive the captured installation image.

Adding boot images for capture and setup

Estimated time: 10 minutes

Windows XP is unlike later versions in that the installation media has no monolithic .wim file that can be extracted during setup. While RIS, essentially the predecessor to WDS, supports deploying Windows XP using the original media, WDS only supports .wim files. For Windows XP, that means creating a model installation and then capturing it back to the server as a deployable image.

Two boot images must be added: the capture image, which the VM will boot into after Windows XP is installed, and the setup image, which the target will use to install Windows XP.

Adding the setup image is simple: mount the Windows 7 media and add \sources\boot.wim. Once this is done, generate the capture image from the setup image by right clicking it and clicking Create Capture Image.

When prompted for a location, save the image anywhere you want, even %TEMP%, as you'll have an opportunity to use the same wizard to import the image once it is completed. If you choose to cleverly save the image in the actual repository location, and then tell the wizard to import the image, you will end up with two copies of the same capture image in WDS.

Creating a model installation in VMware

Estimated time: 60 minutes

Create a virtual machine with typical settings, but be sure to choose "install OS later", or VMware will try to do an "easy install" that automates the installation of tools and drivers. While this isn't fatal, it is simply unnecessary as the target computer isn't a VM.

Open the virtual machine's settings after creation and increase the RAM to 1024 MB; without doing so, booting the WDS capture image may fail. Change the network adapter type to Host-only and attach the Windows XP media to the virtual optical drive. Disconnect the virtual network adapter "at power on" to save a significant amount of time during the "Installing Network" stage of installation.

When indicating that the guest is Windows XP, VMware will default to virtualising an AMD 10/100 NIC, which is not supported by the capture image. You must change it to an Intel PRO/1000 by editing the VM's .vmx file and adding this line:

ethernet0.virtualDev = "e1000"

Launch the VM, enter the BIOS setup and change the boot order to:

LAN > CD > Removable Devices > HDD

Now install Windows XP. Press F5 when the F6 prompt appears (that is not a mistake), and choose the computer type that is compatible with your target. The VMware virtual machine defaults to ACPI Uniprocessor PC, which works for many computers, but you may need to choose an older type, such as ACPI PC for the Tecra, or even Standard PC, if your target is that old.

Although the Microsoft documentation states that the Standard PC HAL is compatible with all six computer types, you cannot easily take advantage of this to create a "universal" image because WDS does very picky filtering of the available images on the target based on the HAL, only allowing an exact match, but not other compatible matches.

Leave all of the regional and time settings at their defaults as they will be discarded anyway later. If you are deploying an OEM installation to the target, you can safely skip entering the product key, as you'll have to enter it again further in the process regardless.

During the OOBE wizard, set your username to SYSTEM. This will ensure that no user account is created, and you can create one for yourself after deployment. Unfortunately, this trick doesn't make the OOBE wizard rerun after deployment. What will happen is that you will be logged in as Administrator because SYSTEM isn't for interactive use. You can't, however, enter Administrator itself in the wizard, as that is explicitly rejected.

It might appear that you can skip the OOBE and have it come back after deployment by cancelling the screen resolution change dialog, but whlie that will skip the OOBE (and leave you with a paltry 640x480 resolution) the wizard will never return. In essence, this is thus equivalent to the SYSTEM trick, but without the resolution boost.

Preparing the completed installation for capture

Estimated time: 40 minutes

Inside the virtual machine now that Windows XP is installed, extract the contents of DEPLOY.CAB from the Windows XP media to C:\sysprep. You must extract the files to this precise location. If you extract elsewhere, Sysprep will ignore the changes you make to sysprep.inf, generate a default configuration in the correct location, and the target will throw a STOP 0x0000007B during deployment.

Note that if you are capturing and deploying to the same physical target, and you are not using a virtual machine for the model installation, you should skip to the part where you run sysprep.exe.

Copy the entire \i386\ folder (including the folder itself, not just the contents) from the Windows XP media to C:\sysprep. This ensures that all drivers and additional files are available to the target as necessary during deployment.

Run setupmgr.exe and create a sysprep.inf with all settings left at their defaults. Now add the following lines to the [Unattended] section of sysprep.inf:

    DriverSigningPolicy=Ignore
    UpdateInstalledDrivers=Yes
Add the following to the end of sysprep.inf:
[Sysprep]
    BuildMassStorageSection=Yes

[SysprepMassStorage]

Ensure that you leave at least one line break after [SysprepMassStorage].

Now run sysprep.exe, selecting Use Mini-Setup and Detect non-PnP hardware. Click Reseal then OK. This process may take about half an hour, so grab a coffee while you wait.

Capturing the model installation

Estimated time: 30 minutes

Your virtual machine should be switched off now, as Sysprep shuts down after it has finished working. Configure the virtual network adapter to connect at power on, and boot the VM over the network.

Press F12 to launch the WDS boot menu when prompted, and select the capture image. Follow the wizard's instructions, which should be fairly straightforward. When the capture completes, the image should be available on the WDS repertoire, but you will have to close and reopen the WDS management console if you wish to see it there.

The capturing process can take quite a while, so another coffee break opportunity is available.

Deploying the Windows XP image

Estimated time: 20 minutes

Connect the target computer to the interface you chose earlier. Some old computers will not be able to negotiate a crossover connection using a normal cable; for them you will have to use an actual crossover cable.

Boot the target over the network, pressing F12 when necessary and this time choosing Microsoft Windows Setup (x86) from the boot image menu. The first part of the deployment is much like a typical Windows 7 installation. When asked to authenticate to the WDS server, use the server's computer name as the domain.

If you do not see the captured installation image in the list, then the computer type selected at the beginning of the VM installation does not match the one for the target. In this case you will need to start again from Creating a model installation in VMware, choosing a different computer type.

If the target enters a reboot loop with the 0x0000007B BSOD, then the mass storage drivers were not properly included in the Sysprep process, either because you didn't modify sysprep.inf correctly, or because you extracted Sysprep to some location other than C:\sysprep.

After installation

Once Windows XP is deployed and running on the target, you will be logged in as the Administrator by default, with no password unless you set one during the setup. You should probably set a password and then create yourself a regular administrator account, for a marginal increase in security.

After deployment, you are probably going to install some drivers for the target computer. If you want, you can even sysprep again and capture the installation from the target, just like you did from the virtual machine. This will result in an image including drivers for the target computer.