PXE boot fails to get IP address via DHCP, but DHCP works when OS booted
I've seen Portfast (or the lack thereof) cause this. Enabling Portfast on the ports between the DHCP client and server resolved the problem for me.
The other time you may see this issue is with Pre-Boot Execution (PXE) devices, such as Windows Deployment Services. The following figure shows a typical PXE implementation. Here is what happens with PXE:
You apply power to your computer, which activates the NIC, but less than five seconds later, the computer’s POST finishes and the NIC attempts to get an IP address from DHCP so that it can load a boot image directly from the PXE server, which fails.
The computer attempts to get an IP address from a DHCP server several times within approximately 10 seconds, after which it gives up and moves onto another boot device, such as the hard drive. The unfortunate part of this process is that because it fails to get an IP address or connect with the PXE server, you are not able to install your new operating system image on that computer.
The problem with this scenario is that because STP makes the computer wait 45 seconds prior to forwarding traffic on the port, the PXE network boot has timed out. image0.jpg PortFast is the solution to this problem of delays when client computers are connecting to switches. PortFast is not enabled by default. With PortFast enabled on a port, you effectively take the port and tell spanning tree not to implement STP on that port.
This solution is not a bad one if only one computer is plugged into the port — so that people will not be creating accidental loops on the network, which can be frighteningly easy to do.
http://www.dummies.com/how-to/content/spanning-tree-protocol-stp-and-portfast.html
If you're unable/unwilling to turn on portfast (or equivalent) for the computer's port, I found that you can also hit the Pause key on your keyboard at some point after it prints "DHCP...". The ASCII graphics will stop spinning. Wait 30 seconds or whatever's needed, hit a key to unpause, and then you'll network boot just fine.
Usually it is one of 2 things (or both simultaneously).
1) Spanningtree protocol on the edge port to which the server connects, Like Ryan Ries already mentioned above.
2) Auto-negotiate between the PC and the switch which takes longer than the time that the PXE bootloader is willing to wait for an address.
If you have no control over the switch the best option is usually to boot the server to Bios. Wait a minute or so to let the switch settle and then leave the bios to continue booting.
Pressing the Pause/ScrollLock button on the keyboard early in the boot (before PXE starts it's boot atempt) can achieve the same thing.
Both scenarios of course imply that you can attach a keyboard and monitor to the device.