feel free to email me at

netboot - simple pxe-compatible dhcp and tftp server

With netboot you could easily bootstrap ubuntu or debian netinstaller. Or assign address to network device like ILO to configure it. Very simple in use and need almost zero configuration. I always hated dhcpd and tftp-ha.

Download: netboot.c
To build it: gcc -o netboot netboot.c

Github: http://github.com/ITikhonov/netboot

For looking who is asking for boot:

kef@flash:~$ sudo ./netboot
request 1 from 00-e0-91-02-9e-24 ()

If you are lucky it will show hostname in parens.

To boot it type:

kef@flash:~$ sudo ./netboot 00-e0-91-02-9e-24
mac pattern:00 e0 91 02 9e 24
request 1 from 00-e0-91-02-9e-24 ()
request 3 from 00-e0-91-02-9e-24 ()
rrq pxelinux.0
rrq pxelinux.0
end is a broadcast address. (Bcast of ifconfig output) is an address of this interface. (inet addr) is an address offered to client.

00-e0-91-02-9e-24 is a mac address of client to bootstrap. You could type last few digits only and use any separator between them (except whitespace).

Bootfile is hardcoded to pxelinux.0. You could put any file under this name. It will use current directory for serving tftp requests.

Both dhcp and tftp implementations are simplified. For example, tftp can not serve more then one file at time. It has zero security, use it in safe environment only.


2008-05-02: show dhcp option 12 hostname if exists

2009-12-02: fixed hanging on nonimplemented options. Thanks to Ian Jeffray for spotting.

2010-01-19: now works on big-endian (ARM for example) cpus. Thanks to Costin Raducanu for testing.