Test Boot from PXE server w/o DHCP by specifying PXE server to use

pxe-boot

Is it possible to test a PXE client by directly expressing the pxe server to use?

I'd like to preferably specify this in grub or from a test VM with CentOS installed. This isn't meant as a production methodology by any means, I just would like to do some testing, but don't have access to our environments DHCP server.

Best Answer

Grub has an ifconfig command that lets you manually configure the network.

grub> ifconfig --address=<IP for this host> --mask=<network mask> --server=<TFTP server address>

Once you've set up the network interface, set the root disk to the network device (nd), point Grub to the kernel/initrd images, then boot it.

grub> root(nd)
grub> kernel /path/to/kernel/image
grub> initrd /path/to/initrd/image
grub> boot