How WDS works – Inside Story

Hello friends

Hope this post finds you in good health and spirit. This is post is about how “Windows Deployment Service” works. I was planning to write about it since long as its an important concept with roots in Windows server and used often by other technologies like SCCM for OSD ( Operating System Deployment).

WDS is a role of Windows server which automates the installation of operating system. For folks who are working since days of server 2003, RIS was its ancestor. WDS was first introduced in server 2003 SP2. I am not going in details of how to configure WDS because there is lot of information available about it. In this blog I will discuss what happens once WDS is installed and configured and client has initiated process of OS installation. So, this blog is focused on details at client end. Getting excited ? So, here is step by step flow:

  1. When you configure “boot from network” as boot priority from BIOS, client will load minimal network driver to support TFTP. Network cards must have PXE support for “boot from network” option. (All new cards have this support so no need to worry about it). In case client machine don’t have PXE we need to boot it using PE cd.
  2. Once client machine has loaded network driver, it will send DHCPDISCOVER broadcast packet in network to look for DHCP server in order to obtain IP address. This packet contains tag for client identifier, client architecture and also “PXE client tag” to inform receivers that this packet is coming from PXE client. DISCOVER packets are sended on port no 67 and 68. Point to note is WDS server uses same port number so the request will reach to WDS too.
  3. DHCP server will respond to DISCOVER packet with DHCP OFFER packet while WDS server will discard it as it can’t provide IP address. DHCPOFFER packet contains IP address and other DHCP options including boot server list in “PXE server” tag.
  4. Client will record this information and will complete DORA process to get valid IP. Once client gets IP it will start discovery of boot server.
  5. To discover boot server, client will broadcast or unicast as per the information it received from DHCPOFFER packet previously. For the purpose it sends DHCP REQUEST packet. This packet will contain IP address of client, its identifier and “PXE client” tag.
  6. Boot server will send DHCPACK unicast packet to client which includes server identifier, server type, Network Boot Program (NBP) file and other information. NBP is a boot program which does architecture verification and starts TFTP session between WDS server and client.
  7. Client will next download either PXEboot.com or PXEbootn12.com. PXEboot.com is used if boot proceed without asking user credential but if F12 is needed, then PXEbootn12.com will be downloaded.
  8. If WDS server has multiple boot.wim file, its information is stored in BCD store on server. Once PXEboot.com ot PXEbootn12.com will be downloaded, bootmanager.exe will be downloaded which in turn download BCD on client and gives option to select appropriate boot.wim.
  9. Once boot.wim is selected then boot.sdi is downloaded. Boot.sdi is the location where boot.wim is mounted as we can’t directly access boot.wim file. Once boot.sdi is downloaded, boot.wim will be downloaded next and loaded in physical memory of client.
  10. Once boot.wim is loaded, install.wim will be downloaded and installed at client machine. Install.wim is main OS file so once its installed, OSD is done. Hurray...

So, this is complete process of WDS working. Since its too long and complex (at least for me), let me summarize the flow of downloading of file:

NBP – PXEboot.com or PXEbootn12.com – Bootmanager.exe – BCD store – Boot.sdi – Boot.wim – Install.wim

Hope you find this post informative. Say yes for me as it took lot of time for me to complete. lol. See you soon with some other tech-docs. Till then take good care of yourself. Bye…

 

 

One thought on “How WDS works – Inside Story

Leave a comment