INTRODUCTION

DHCP on CentOS 7/RHEL 7

DHCP Error in WDS Server 2008 R2.
Everything was working perfect, suddenly i receive this error message while instalilng windows 7 from WDS Server.
error message was:

WdsClient: An error occurred while obtaining an IP address from the DHCP server.

`

Please check to ensure that there is and operational DHCP server on this network segment.

See the screen shot:

WDS Client Error Message
WDS Client Error Message

SOLUTION

Solutions I have applied:

  • I added the latest driver in my boot image.
  • Verify network cable
  • Verify DHCP server.

But the result was same error, after spending more time I found the real issue:
So the real issue was that the client network card took so long to obtain an IP address and then the WDS Client timed out.

Now see the solution of this problem which works for me.
Simply mount the boot.wim image using Dism.exe in offline mode then edit some files, save and unmount it. That’s it

See below:

Step 1:

Open cmd using administrative privileges.

Step 2:

To mount image, enter this command in cmd:

Dism /Mount-Wim /WimFile:C:\path\to\image\boot.wim /index:2 /MountDir:c:\path\to\mount\point

Step 3:

Now open folder where you mount image and rename setup.exe to setupx.exe ( this file will be on root of mount folder )

Step 4:

Edit \windows\system32\startnet.cmd in the mounted image folder.

Then paste the below Code:

@echo off
@echo Loading WinPE… wpeinit @echo Starting networking…
:testagain
ping -n 1 SERVERNAME > NUL
if {1c918b003a0fec779e46518dd4d8df22f3dc554de918030f5a1a0cfd93cb28be}errorlevel{1c918b003a0fec779e46518dd4d8df22f3dc554de918030f5a1a0cfd93cb28be} == 0 goto pingok
REM wait 3 sec. and try it again
ping -n 3 127.0.0.1 >nul
goto testagain
:pingok
@echo Running Setup…
x:\setupx.exe /wds /wdsdiscover /wdsserver:SERVERNAME

Step 5: 

Save startnet.cmd and close then unmount image using follwing command.

Dism /Unmount-Wim /MountDir:c:\path\to\mount\point /commit

Note: change “SERVERNAME” in above code with your WDS Server Hostname or IP address.
That’s it..

Now reboot your client. Thumb Up if it works for you.
Leave comments if you need any help and dont forget to say thanks if it works 🙂 .

Video Version of this How To: