Udostępnij za pośrednictwem


WDS Client DHCP issues… Here is one solution

I was on the road last Friday and help one of my partners to setup a network based deployment for his PC production floor.
It all worked fine until we hit this error message:

wdsdhcperror

Great :-(

So the first assumption was that the network card driver is missing in the WDS Windows PE image.
I added the latest driver using the following steps:

  1. Exported the current boot image from WDS server (right click on the boot image and select “Export Image”) to c:\PE\wds.wim
  2. Checked that the OPK (AIK will work as well) for Windows Vista was installed
  3. Opened the “Windows PE Tools Command Prompt” and changed to the c:\PE directory
  4. Created a “mount” directory (“mkdir mount” will do)
  5. Mounted the exported wds.wim image: “imagex /mountrw wds.wim 2 mount”
    It’s important to use the index “2” as the wds.wim will contain 2 images.
  6. Downloaded and extracted the latest network driver to c:\PE\drvs
  7. Used the peimg.exe utility to integrate the drivers: “peimg /inf=drvs\*.inf mount\Windows”
  8. Unmounted the image and commited the changes: “imagex /unmount /commit mount”
  9. Replaced the current WDS image with the new one (right click on the boot image and select “Replace Image”)

Here is a script that would do part 5 to 8:

imagex /mountrw wds.WIM 1 mount
peimg /inf=drvs\*.inf mount\Windows
imagex /unmount /commit mount

Tested it again… Same error!! So this wasn’t the solution.

I opened a command prompt window while the error message was displayed by pressing “SHIFT + F10” and then checked the network connectivity.

“ipconfig” showed that the client does not have an IP address. Some network cards take a very long time to obtain one, so it tested it again after 20 secs and the client had an IP address.

So the real error was that the client network card took to long to obtain an IP address and then the WDS Client timed out.

I checked for a solution online, but was not able to find one, so I had to create one that I am happy to share with you.

 

Build your custom WDS Windows PE image:

  1. Opened the “Windows PE Tools Command Prompt” again and typed “copype x86 c:\wdsbootimage”.
    This created a Windows PE image in “c:\wdsbootimage”

  2. Mounted the created WinPE.wim to “mount”: “imagex /mountrw WinPE.wim 1 mount”

  3. Added all the necessary network and storage drivers to this image (use the steps descried earlier on…)

  4. Mounted the image exported earlier: “imagex /mount wds.wim 2 mount”

  5. Copied the “sources” (c:\pe\mount\sources) folder to the mounted WinPE.wim (c:\wdsbootimage\mount\sources)
    This added the necessary WDS Client setup files to the new image.

  6. Opened and edited the “startnet.cmd” file in the new image “notepad c:\wdsbootimage\mount\windows\system32\startnet.cmd”
    This files contained one line: “wpeinit”.

  7. I changed this to:

    @echo off
    wpeinit

    @echo Waiting for the WDS server...
    :testagain
    ping -n 1 wds > NUL
    if %errorlevel% == 0 goto pingok

    REM wait 3 sec. and try it again
    ping -n 3 127.0.0.1 >nul
    goto testagain

    :pingok

    x:\sources\setup.exe /wds /wdsserver:WDS

    This small script will wait until it can ping the WDS server (in this case the server is named “WDS”) and than start the setup in WDS mode.

  8. Saved the changed startnet.cmd file

  9. Removed all unnecessary components from the new WDS WinPE image: “peimg /prep mount\windows”

  10. Unmounted the image and commit the changes: “imagex /unmount /commit mount”

  11. The WinPE.wim file was still around 200MB, so in order to reduce this size I had to export the new image to a new WIM-File:
    ”imagex /export WinPE.wim 1 wds.wim “Custom WDS Windows PE”
    The now created wds.wim was only around 120MB.

  12. Replaced the current WDS image with the new one (right click on the boot image and select “Replace Image”)

I tested it again and it now worked. :-)

Comments

  • Anonymous
    April 14, 2014
    I had the same issue, tried a different switch, checked DHCP, rebooted WDS........although there was a working PC connected to the same network point before (Domain|DHCP) in the the end I found it to be the network cable :o( changed it PC loaded without any errors.
  • Anonymous
    January 08, 2015
    I had the same issue as well. I was using a long cat5 cable, then I changed it to a 1MCat6 and it worked. What a weird thing. Thanks Atif!
  • Anonymous
    August 04, 2015
    This post saved my life!
  • Anonymous
    September 30, 2015
    Swapping the cable to a cat6 fixed it for me too! Error went away! Thanks for the tip!
  • Anonymous
    January 18, 2016
    The comment has been removed
  • Anonymous
    April 18, 2016
    I was having the exact same problem. I saw your advise above and just switched to a different cable I had on my desk. It now works perfectly. Thanks so much for the advice.