Windows Deployment Services

From We Got Served Wiki

Jump to: navigation, search


For those wondering what Windows Deployment Services is, basically it is a service for performing network booting using the PXE boot evironment. Its main purpose is to distribute Windows Vista, Server 2008, and other similarly based Operating Systems. As to why you would want it? Because it uses Vista style boot.wim files. Which among other things, you can actually boot the WHS Client Restore disk over the network this way. Enough to get you interested? Good, now lets read on.

Caveats

Normally, I wouldn't cover this first, but considering the nature of what WDS is meant for, and how I will be walking you through the installation and configuration, it is best that this is handled first as I will be walking through this for Windows Home Server.

First of all, Windows Deployment service requires Active Directory, which means you either need to join WHS to a domain controller, or promote it to the domain controller. Personally, if you really want to do this, I highly recommend that you follow this tutorial on how to promote WHS to a domain controller. It is fairly comprehensive, and includes everything that will be require by WDS, which is namely making your server a DHCP Server.

Also, because of it's "domain environment", WDS will try to automatically join any computer you set up to the domain. There is no choice in this, but there are work-arounds. However, this built in functionality may be just what you want. I'll be covering that pretty much at the end.

Prerequisites

What to do

First off, you should have promoted your server, or joined it. If not, do so first. Windows Deployment Services requires that the computer be part of the domain. And your best bet is to run WHS as a domain controller. You will also need to have a DHCP server capable of handling the PXE stuff properly. The best bet is to use the DHCP Server built into Windows as it will mean less chances for issues, and will work. If you haven't already, check out the AD on WHS section for that.

Installing Components

Assuming you have already done this, you'll need to head over to the "Windows Components" which is found in "Add or Remove Programs" or by running "sysocmgr /i:sysoc.inf". "Windows Deployment Services" should be one of the last entries. Check it and then click next. After Windows has finished configuring everything, it will prompt you to restart, and do so. Once it has finished rebooting, make sure it doesn't prompt you that a service or device failed to load. If it does this, check the event log, as it is probably the DHCP Server not connecting properly. Fix that and reboot again.

Starting the Wizard

Okay, now that Windows Deployment Services is installed and the necessary components are configured, lets launch the management console for it. The console for it is located in Administrative Tools, and make sure you launch "Windows Deployment Services" and not the "Legacy" version. You'll see a screen giving a description of Windows Deployment Services. Open the section that says "Servers", and you should see your server's name. Click on this, and the screen should say that WDS is not yet configured. Right click on your server and select "Configure Server". This will bring up a wizard that will configure all the necessary options. Click Next to start the wizard.

Configuration Wizard

Now it will as for a location for the files. I recommend using "D:\Apps\WDS", or if you have a dedicated drive, use that as Windows Deployment Services uncompresses the DVD images and can use 10-15GB per architecture of each Operating System. After you have that set, click Next. If you have the built in DHCP Server installed, it will detect that and prompt you with two options, "Do not listen on port 67" and "Configure DHCP option 60 to 'PXEClient'". If you want some info about why these are necessary, there is the link at the bottom of the page which will explain why. Check both of these boxes and click Next. Now you can configure how WDS responds to different clients. For now, select "Respond to all (known and unknown) client computers" and make sure you uncheck "For unknown clients, notify administrator and respond after approval". You can tweak with this later but for now we want it to respond to any computer that wants to boot from this PXE Server. Now click finish. It will configure Windows Deployment Services, and may take a while.

Configure Firewall

Assuming you've already unblocked the DHCP server, and the LDAP/Kerberos stuff (if you haven't, do this now as it will be required), now we need to make sure the Windows Deployment stuff gets unblocked too. You'll need to add "C:\WINDOWS\system32\tftpd.exe" and port 4011 (UDP only) to the exceptions. tftpd is the TFTP server that is necessary for sending data over the PXE Boot environment, and port 4011 is called during the PXE boot process.

Preparing the Images

After it's done, it will ask you if you want to add images now, and will have that option selected by default. Go ahead and uncheck that option, we'll need to open, mount or insert a Windows Vista, Windows 7, or Windows Server 2008 (or R2) before we can proceed. WinRAR or UltraISO can both open ISO files if you need. However, the files that we will need are boot.wim and install.wim, which are both located in the "Sources" directory on the disk. Install.wim is approximately 3GB, while the boot.wim is about 120MB. Sizes will vary depending on the operating system and the architecture.

Adding Boot Images

Before you can boot with Windows Deployment Services, you'll need to add the boot images. Also, from what I've seen, the x86 boot image can install both x86 and x64, but the x64 can only install the x64. This may not be the case for you, but it was for me. But either way, I would recommend installing the boot images for both architectures just in case. So, in the Windows Deployment Services console, right click on "Boot Images" and click "Add Boot Image". Select the "boot.wim" that you want, and click Next. It will then prompt you for "Metadata". This allows you to set the name and description. The default is "Microsoft Windows Setup (x86)", which is very descriptive. I would recommend changing the image name to something like "Microsoft Windows Vista Setup (x86)", or the like. Click next, and it will process and add the file. Once you've added the x86, add the x64 version too.

Configuring Boot Options

By default, when you try to do a network boot, you'll have to press F12 regardless of how you get to the PXE Boot ROM. Personally, I find this annoying and highly unnecessary. So, right click on your server and select property. Here you can configure a lot of the way WDS works, but ignore that for now. We want the Boot tab, so open that. There is a section for "Default Boot Program (optional)". Under both the x86 and x64 architecture options, it lists "pxeboot.com" as the current program. Click "Browse" and make sure you are in the folder for the right architecture, and select "pxeboot.n12". This eliminates the need for pressing F12, and will just start into the boot process once it has found the PXE Server.

  • This has to be done after adding the appropriate architecture's boot image or else the files just won't be there.

Adding Install Images

Now you'll need to add install images so you can actually use Windows Deployment Services to install an Operating System. Also, WDS allows (forces rather) you to group different install images together. This is mainly for ease of access and setting permissions. Also, you'll need about 4GB of space per architecture, per version/type of the OS. WDS is pretty good about managing space, but it is still slightly less compressed than the DVDs.

With the boot image, it doesn't really matter which version you use as it can install pretty much all versions of Vista, Server 2008, and more recent. However, here I'm going to assume you have a Vista x86 (32-bit) disk. Pop the disk into the server, or copy the install.wim to the server somehow. A temporary location is fine, we only need it long enough to add it to WDS. In the WDS console, right click on "Install Images" and select "Add Install Group". Name this "Client OS", and click okay. Right click on the newly created group and select "Add Install Image". This will bring up a wizard asking for the path. Click "Browse", and select the Vista install.wim and click next. It will now show a list of all the versions included and allow you to uncheck the versions you don't want. Pick whichever you want (Remember, Home Premium and below can't join the domain), and click next. Now, it prompts you to customize the name and the description for each version. If you are so inclined, you can do so. After clicking Next again, it will show the versions you want to include and the names you may have given them. After reviewing them and verifying this is correct, click Next and the wizard will process the file and add the versions you selected to the WDS folders. After this has finished, feel free to delete that install.wim file if you copied it to the server.

Server Properties

Earlier, I skipped over a number of settings. I did this, because the default settings are adequate and will work for most setups. However, if you are like me, that isn't good enough. Right click on your server's name in the WDS Console, and select Properties.

General

The General tab gives you some basic information about the WDS. Just the server's name, the location of the files, and the mode that it is in (should only ever be in Native mode for us). Though, nothing fancy.

PXE Response Settings

Here, there are three options with a check box for the last. The three options are to not respond to PXE Boot requests, only respond to known clients and to respond to all requests. Not worded exactly, but close enough. That check box that I mentioned earlier response to unknown computers but requires administrative approval. This can be used to "add" the computer to the list of known computers before joining the domain. Makes it easier to set it to only boot to known computers later, and when you do install with WDS, it will use the existing name for it from the domain.

The only other option on the page is a boot wait time, which for those using this on their home network is pretty much useless.

Directory Services

This allows you to change the naming policy for new machines, and to specify where to look for authorized accounts. For the most part, this won't be used by anyone in a home network. Well, maybe the naming thing will, but I would recommend using the PXE Response settings to "capture" the computer ID, and set it there.

Boot

Here, you can specify the default boot program (which you've probably already changed by now), and the default boot image. The other boot programs are not terribly usefully unless you have a serial port of debugging, so pxeboot.n12 is probably going to be the best bet for you here. As for the boot images, this is useful for forcing x64 systems to boot to the x86 boot image, or playing around with similar stuff, but not much else.

Client

Here you can specify to use an unattended configuration file globally, or prevent a client account from being created. I wouldn't recommend using these settings as you can use unattended configs per version.

DHCP

Here are those original options for the DHCP server. I would recommend not messing with this unless you want your WDS Server to not work.

Advanced

Here, you can specify which Domain Controller to use and which Global Catalog. You can also specify whether or not you want the Windows Deployment Service server to authenticate in DHCP (which I recommend doing).

WHS Restore

There are a couple things that I did not mention yet, and that is WDS can use any WinPE boot image. Basically, that means if it is a boot.wim file, it can be booted. And if it was created without using the boot.wim from the DVD, it will lack the generic WDS Client program. What does all this mean? It means that you can use WDS to boot the Windows Home Server Restore Disk, and get it to launch the Restore Wizard. Which means you can restore a computer over the network instead of just installing it! I have successfully tried this out and restored a computer using only the WDS Server to boot. It worked great!

I'm sure you're going to want to do this too. So you'll need access to the WHS Restore Disk, which likely means downloading the most current version. After that is done, either use a program like WinRAR to open it, or burn it to a disk. Now add a new boot image to WDS, and navigate to "X:\Sources\boot.wim". When you are prompted to rename the boot image, I recommend doing so and naming it "Windows Home Server Restore" or something similar. Normally it is "Windows Setup (x86)" I believe, so not very descriptive normally.

This can be done with any WinPE image that doesn't have the WDS Client built in, such as VistaPE, the WHS Server Recovery image (located on the OPK disk) or other vista based "LiveCDs". Just add that boot.wim file too.

Extras

Normally, when you install an OS from WDS, it will automatically join it to the domain if it is capable of doing so. For some of us, we don't want that. To get around this, make sure you have a domain user on the server that doesn't have permission to join a computer to the domain, any normal user account will work for this (like the WHS created accounts). Right click on a install image (and select properties), or an install group and select security. Now add whichever user to read the file or files. Now when you boot from PXE, log in with that account. You'll be able to install, but it will not join the domain.

Done

Assuming everything is configured properly, you should be able to boot, and install or restore all you computers now. Any issues that may pop up should be solvable by reading the error messages in the event log.

I haven't covered everything that WDS can do, but if you have gotten this far, I think you should be able to take care of yourself! If you need that extra little helping hand, this may be just what you need. Includes info on how to customize images, create unattended install configs and all the other features of WDS.

Credit

Originally written by Drashna for We Got Served. Thanks goes to Mitch Tulloch for the above linked tutorials, for without them I probably won't have WDS set up yet.

Windows Media Center