WDS, PXE Boot

Let’s start with the prerequisites/needs we have:
  • Windows Server 2008 R2Windows 7 CD or ISO
    • Microsoft Server 2008 might be the same
    • Small Business Server with 2008 (R2)
  • Windows Automated Installation Kit (AIK) for Windows 7
  • DHCP Server
  • Active Directory (optional, but useful)
  • DNS Server (optional, but useful)
  • Some patience
Setup Active Directory 
 
Once you got Windows Server 2008 R2 up and running, log in as Administrator and configure a static IP-Address on your interface. Afterwards create the domain using dcpromo (Start -> run -> dcpromo). dcpromo will automatically add the needed roles and start the Active Directory Wizard for you. I always use “advanced mode installation”, select “Create a new domain in a new forest” and specify your domain. Setup DHCP Server WDS supports PXE boot, therefore we need a DHCP Server. I’m using the Windows DHCP Server as WDS will add the needed option there. The setup is easy, open the Server Manager, right click on Roles, select “Add Roles” and activate the “DHCP Server” in the upcoming wizard. Make sure to modify the DNS server as the wizard will use 127.0.0.1 (remember, dcpromo configured that IP-address on our interface) – you should use your Windows Servers IP-address here. Don’t miss to create a scope for your network. I disabled IPv6 (still have to look into) and left the credential setup untouched. Setup WDS Server Perhaps you already saw the Windows Deployment Services role while setting up the DHCP Server. That’s all you got to do, add roles, select “Windows Deployment Services” and leave everything untouched. Setup AIK Before we’ll start to add our first image to WDS and do our first attended installation we’ll finalize our installation by installing AIK. Mount the ISO you downloaded from MS and run StartCD.exe and select “Windows AIK Setup”. Again, nothing special, leave everything untouched and click next. Configure WDS Before we can start our first installation we have to configure WDS. Open the WDS tree in Server Manager and right click you server and select “Configure Server”. As mentioned above I have a second disk for WDS. I turned out that it is a good idea not to use a root folder as we need some additional directories. I used “e:\images” for my setup. Activate “Do not listen on port 67″ (our DHCP Server is already listening on that port) and “Configure DHCP option 60 to ‘PXEClient’”. If you are using another DHCP Server you have to set option 60 on your own, if it is running on another machine you want WDS to listen on port 67 (in fact, deactivate both option). On next screen switch to “Respond to all client computers (known and unknown)” and active “Require administrator approval Deselect”. 
 
First Windows 7 installation using WDS 
 
Everything we need is set up and we can start to create our master image. You can install a PC using the DVD, but I’ll use WDS for that, too. Fortunately MS already gave us start images on the Windows 7 DVD. So make sure you got it mounted. I assume you still got the “Server Manager” open and see the 5 sections of WDS:
  • Install Images
    • all images you can deploy
  • Boot Images
    • all boot images used for PXE boot (in our case different WinPE flavours)
  • Pending Devices
    • clients waiting for approval
  • Multicast Transmissions
    • multicast sessions you created for faster mass deployments
  • Drivers
    • drivers you added to WDS
First we need a boot image. Simply right click “Boot Images” and select “Add Boot Images…”. Select [Windows7DVD]:\sources\boot.wim, keep the name, that’s it. Adding an install image is nearby the same, right click “Install Images”, “Add Install Image…”, choose the predefined image group name and select [Windows7DVD]:\sources\install.wim. On the next screen only leave one edition selected. As I’m talking about an Active Directory setup choose between “Professional” and “Ultimate”. That’s it – nothing more to do to start a manual setup with WDS. All you have to do is to PXE boot a machine now. Within a short time you should see that the client is trying to contact the server and the boot process. Starts the boot image we defined (boot.wim). After selecting the locale you have to authenticate as domain admininstrator. These credentials are used to connect to WDS. The next screen won’t give us many options as we only have one install image in place. Choose the disk to install and that’s it. WDS will now deploy the image to your machine. After the reboot (don’t forget to disable PXE again if needed) you simply go through the welcome setup as usual. You can skip the Product Key / activation step as 30 days should be enough to set up the gold image. Log in as domain-admin and remove the local user you had created during the setup process.   
 
Creation of unattended.xml file 
 
Windows System Image Manager” (WSIM) (you’ll find it in your startmenu). As we want to create xml-files for the windows we prepared choose it using “File”->”Select Windows Image…” WSIM will complain about a missing catalog file. We don’t have a catalog file but fortunatly WSIM is able to generate one based on the image file. And that is the reason why we had to choose an image name with characters that are allowed for file names. Instead of taking the file name of the image WSIM uses <image name>.clg for the catalog file. First time is named my image “Windows 7″ and WSIM weren’t able to generate the catalog file. WSIM writes the catalog file to the same location as your image file. WISM is split into five blocks. “Distribution Share” can be ignored here. “Windows Image” describes the content of our image (I think that’s the content of the catalog file) with all available options (Components) we can use in our unattended file. “Answer File” is the content of the unattended file and “Properties” is used to set values for the Components we added to our unattended file. First we will create the unattended file for the Windows PE (boot image) environment. Select “File”->”New answer file”. The “Answer File” now shows a tree divided into “Components” and “Packages”. We’ll only take care of the components tree and the 7 elements (windowsPE, offlineServicing etc.) As said before, we need to tell how to connect to WDS, which install image to use and how to set up the disk. On top of that we also have to configure the locale – let’s start with that. Open up the Component tree and navigate to“x86_Microsoft- Windows- International- Core – WinPE_6.1.7600.16385_ neutral” – ok, in my case. X846describes the architecture (amd64 = 64bit system, x86 = 32bit system,) 6.1.7600.16385 the patch level (windows 7 with service pack 1 installed in this case). I hope you get the idea, I have added-”x86_Microsoft-Windows-International-Core-WinPE_6.1.7600.16385_neutral” by right click “Add Setting to Pass 1 windowsPE”. You’ll now see new elements in the “Answer File” block. Click on”x86_Microsoft-Windows-International-Core-WinPE_neutral” and have a look at the “Properties” block. We need to define InputLocale, UILanguage and UserLocale. Define “en-US” here for the three elements. Now choose “SetupUILanguage” in “Answer File” block and set the UILanguage to “en-US”, too. Similarly we need configure other component which I have frame into the following table.

Save the file and close WSIM Console. As we already configured the WDS-unattended file, we still have to add our created image including the unattended file we created. Navigate to ImageGroup1 (“Server Manager” -> WDS -> <server> -> “Install Images”), right-click and select “Add Install Image…” and select the image where you have placed (D:\ Images\filename.wim). Now open the properties of the image added to the server, activate “Allow image to install in unattended mode”, open “Select file…” and choose the unattended file you created. Last thing you got to do for a 100% unattended installation is to disable the capture boot image we added, else the pxe-boot loader will ask you which image to start. For more customization of windows 7 and for more deep understanding you can refer the below Microsoft link:
 
http://technet.microsoft.com/en-us/library/dd349348(WS.10).aspx#BKMK
 
For adding the Drivers into the WDS, please go with below video.
 
http://www.youtube.com/watch?v=MSuH9fLVSA8
 
 
 

Leave a comment