Deploying Windows 8: Unattended Installation Using Windows Deployment Services (WDS) – Part IApril 25, 2012 at 12:45 am | Posted in Deployment, WAIK, Windows 8, Windows Deployment Services (WDS) | 8 Comments
Tags: Deployment, Unattended Deployment, Unattended Files, WAIK, WDS, Windows 8, Windows Deployment Services (WDS)
For a while now I’ve been preparing articles in this blog regarding deploying operating systems, and especially unattended deployments. I’ve started with Windows Vista deployments and the initial version of Windows Deployment Services (Post I, Post II and Post III); the moving forward with Windows 7 using also WDS (Post I and Post II), and also MDT 2010 adding Microsoft Office 2010 to the mix (Post I, Post II and Post III).
And of course, with the release of Windows 8 I had the necessity to prepare a new set, even though this new OS is just at “Consumer Preview” beta.
This set of posts is intended to provide step-by-step procedures to accomplish a full automated deployment of Windows 8 using WDS.
Overview of the Process
The main goal of this process we are going to review in detail is to provide an unattended deployment of Windows 8 using Windows Deployment Services (WDS).
In order to provide a complete guidance, we are going to capture an installed Windows 8 image, add it in WDS and then use this customized image to deploy it using unattended files.
In this set of posts we are going to examine:
- Reviewing requirements.
- Installing and configuring WDS Role.
- Adding Boot and clean Windows 8 images to WDS.
- Create a capture boot image in WDS.
- Capture the Windows 8 reference machine.
- Prepare Windows System Image Manager (WISM).
- Manage first unattended file: WDSClientUnattend.xml
- Manage second unattended file: AutoAttend.xml
- Deploy Windows 8 using Unattended Files.
1. Reviewing Requirements
For the scenario we are going to review, here are the pre requisites we must fulfill in order to complete the unattended deployment of Windows 8:
- Active Directory and DNS server in place. The computer running WDS must be a member of an Active Directory.
- An active DHCP server on the network
- An NTFS partition on the server with the WDS role to store your OS images.
- Windows 8 media. To download it, access this link “Windows 8 Consumer Preview”.
- Windows Automated Installation Kit (WAIK). This is an optional component that we can use to create unattended files.
The WAIK version we are going to use is the version released for Windows 7, which is available in the following link: “The Windows® Automated Installation Kit (AIK) for Windows® 7”
2. Installing and Configuring WDS Role
The steps necessary for this are really simple and covered in this previous post of mine: “Deploying Windows 7 Using Windows Deployment Services (WDS): Step-by-Step – Part I”.
3. Adding Boot and Clean Windows 8 Images to WDS
These steps are also simple if you ever manage WDS. Let’s review them:
3.1. Access the WDS Console and right click in “Boot Images” and select “Add boot image”.
3.2. Select the Windows 8 media and locate “%drive%\sources\boot.wim”.
The “boot.wim” file is the Windows Preinstallation Environment (Windows PE), which is a minimalistic OS in charge of preparing the environment prior the installation. For more information about Windows PE, check the following link: “What is Windows PE?”
3.3. Select the name we are going to use to identify the image, in my case “WinPE – Windows 8 (x64)”.
3.4. Click “Next” in the following screen and wait until the process completes.
3.5. Once it’s completed, in the WDS console the new image will appear.
3.6. Now, for adding a clean Windows 8 install image, in the WDS console right-click “Install Images” and select “Add Install Image”.
3.7. Create a new image group; in my case I’m using “Windows8”.
3.8. Select the installation file available in Windows 8 media in the following path: “%drive%\sources\install.wim”.
The “install.wim” file is where all the Windows operating system files are stored and compressed for optimization. In this new version, the Windows 8 files we have available in the media correspond to the specific version of Windows we’ve downloaded. In the previous versions (Windows Vista and Windows 7) the size of “install.wim” was a little bit bigger since it contained files from several OS versions.
Also, in Windows 8, the compression algorithm for this file has change in order to optimize the download process for installation.
3.9. Click “Next” in the image selection window.
3.10. Also click “Next” in the following step to confirm the new image to be added.
3.11. Once we click “Finish”, we will see the new image added to Windows Deployment Services.
An important part of the OS life cycle in our environment is to distinguish the base images we are using. This base image does not only refer to the OS, it also includes the applications and basic configurations we add to the operating system.
Even though we don’t need to capture a reference Windows 8 image to accomplish an unattended deployment, we are going to take this scenario to understand a little bit more about the possibilities in WDS.
4. Create a Capture Boot Image in WDS
In order to be able to capture a Windows 8 image using WDS, we must convert a boot image into a “Capture Boot Image”.
This type of image is basically a Windows PE modified to be in charge of capturing a prepared Windows 8 image, instead of providing the environment for an installation. The steps are really simple:
4.1. Copy the “boot.wim” file located in Windows 8 media to a local folder in WDS. Alternatively we can “Export” the boot image we’ve added in WDS.
4.2. Right-click in the existing boot image in WDS and select “Create Capture Image”.
4.3. Select the image name, description, and the location of the “boot.wim” file copied in the first step.
4.4. We’ll receive a warning regarding the image we are about to modify: “Image File with the same name already exists. Do you want to append to the existing file?”
Clicking “Yes” will keep the original WinPE image and add the capture WinPE; if we click “No”, the entire image will be overwritten with the new capture WinPE.
Take note that we are not going to replace the boot image we’ve added earlier in WDS; in these steps we are going to generate a new one.
4.5. Complete the steps and select “Add image to the Windows Deployment Server now”.
4.6. Confirm the location of the new boot.wim file.
4.7. Insert the boot image name, in my case “Capture (x64)”.
4.8. Complete the wizard and the new boot image should be added to WDS.
5. Capture the Windows 8 Reference Machine
The capturing process of a Windows image is performed by using a tool provided by Microsoft “sysprep”. Sysprep is the component Microsoft provides in order to IT teams be able to scale OS implementations.
With sysprep we are able to “generalize” an OS by removing some particular characteristics in Windows and transforming this new “generalized” image in a prepared OS ready for a massive deployment. If the image is not generalized we will not be able to capture it using the image we’ve selected earlier.
By applying sysprep we’ll be able to remove some specific data from the OS installation, for example:
- Computer name
- Owner and Company name
- Domain or workgroup membership
- TCP/IP Settings
- Regional and keyboard settings
- Specific hardware drivers. This refers to specific computer hardware, like video or audio drivers. But if you only applied drivers used on the Windows installation, the same will apply for the deployment, but any other external driver installed will be unavailable.
- Any saved network connections (wireless networks saved)
- OS product key. This is an important note, since no matter if your product has been activated; the key is reset after this process.
But of course, there are other several components that will be kept to maintain this as a base image. For example:
- Programs and features installed.
- Local Users and Groups created.
- Product Keys used for programs installed. Meaning if you have Microsoft Office installed, the key used will remain as the same on the deployments.
- Windows updates installed
- User Profiles: Since all the profiles configuration are basically data stored on the Users folders, all that information will be uploaded within the image.
- Printers installed.
For more information about sysprep, take a look to the following link: “What Is Sysprep?”
The process of preparing the image requires only running a specific command line; let’s take a look to the steps:
5.1. Access the reference Windows 8 image.
5.2. In a command prompt, locate the following folder: “C:\Windows\system32\sysprep”.
5.3. Run “sysprep /oobe /generalize /shutdown” (alternatively the /reboot parameter can be used). This command line will generalize the OS removing the specific components mentioned above and shutdown after the process is completed.
We must remember that, since this OS is going to be generalized, the next the normal boot process occurs, it will appear as Windows was just installed. And, of course, prior to that we must capture this image and store it as our base Windows 8 image in WDS.
For more information about this generalize process, take a look to the following link: “Prepare to Capture an Image for Deployment (Generalize)”
5.4. Configure the reference machine to boot from network. Usually by using F12 in the start of the boot process we will be able to select the network card as the preferred boot option.
5.5. Boot from network in the reference machine. Since we have two boot images available in WDS, we should see something like this.
Select the capture image.
5.6. Once the capture image is loaded, a new wizard will appear.
5.7. Select the volume to capture “C:\” and select an image name and description.
If no drive is available to select, this means that the image was not generalized properly. The only volumes that can be captured are those generalized with sysprep.
5.8. Select a local path for the image location and optionally we can upload the image we are going to create to WDS; for that we need to use the WDS Server FQDN (we will be prompt for credentials) and selecting the image group.
If the image is not uploaded to WDS, we can still retrieve it later in this machine and import it manually to the server using the WDS console.
The capturing process will start and is going to take a while to prepare the reference WIM file.
With that, we’ve completed the steps to prepare our environment and the reference image is uploaded in WDS.
In the next post, we are going to take a deep dive into the unattended files: Understanding how they work, some best practices and of course generating our own for a complete unattended Windows 8 installation using WDS.