NetBoot

Preparation

Prerequisites

Read about Bootp and PXEBoot and probably best, if you understand them well.

First, determine whether your bootloader even supports netbooting: start a wireshark capture on your PC interface that you intend to use to serve the device, if it doesnt make a dhcp/bootp request, setting up a dhcp server on your PC is pointless. NB: some devices do this selectively - the Soekris 4801 for example has abios wher eyou can set to boot from CF (80,81=compact flash) or from network (F0, iirc). Other devices may also be modal (ie if ethernet is plugged in at boot, etc..)

Doing a wireshark capture will also tell you if your device has a tftp client (it will make a tftp request for a file) or a tftp server (it will silently wait (briefly) for your client to connect)

Don't forget to check if the tftp directory /var/lib/tftpboot was created correctly (add it if it hasn't already been created).

Edit /etc/default/tftpd-hpa to show the following:

RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"

Start the tftpd daemon with the command:

sudo /etc/init.d/tftpd-hpa start

Verify that inetd is listening on the right port:

netstat -lu

should show a line with:

udp 0 0 *:tftp *:*

DHCPd

You need to decide on what network interfaces the DHCP server (dhcpd) is supposed to serve DHCP requests? First list available interfaces with ifconfig then edit the line in /etc/default/dhcp3-server file. Separate multiple interfaces is done with adding simple spaces, e.g. "eth0 eth1". like this:

INTERFACES="eth1 eth2"

The setup in this case is basic, and only utilizes one wired interface (eth0), and the file looks like this:

INTERFACES="eth0"

To configure the dhcp server you need to edit the /etc/dhcp3/dhcpd.conf file. The below lines needs to be added to the default file. Hereby substituting IP and MAC address as needed. Beware not to forget the semicolons (";") at the end of lines.
In this case the setup is based on the use of the 192.168.23.xxx IP range, and the device which is to boot has a fixed Ip-address (192.168.23.2) based on its MAC address validation.

Hereafter it is good to ensure that the eth0 interface is up and active, with:

sudo ifup eth0

Check if the eth0 interface has recieved the correct static IP-address:

ifconfig eth0

If the configuring of your dhcp server is correct, it will start with the following command (the options are stop, start, restart):

sudo /etc/init.d/dhcp3-server start

The dhcp3 server will either reply with an [OK] or [fail], but you can do an extra check and verify it runs (if not, you may have a problem in the dhcpd config file):

ps ax | grep dhcpd

Option 2

Dnsmasq is a DNS resolver, but also includes a DHCP server and a TFTP server too! Add the following configuration to /etc/dnsmasq.conf, or in a file in /etc/dnsmasq.d/ for recent Debian/Ubuntu versions:

Edit interface file

I found that I needed to edit the /etc/network/interfaces file to fix an issue between the Gnome Networkmanager and the dhcp3 server. Without adding the below lines the dhcp server could not identify the correct interface to listen on: