This guide shows how to boot openelec using pxe boot with system and storage mounted via nfs.

Download the image for your device.

Now openelec should boot using tftp and nfs!

Basically you can use the above mentioned steps when configuring this in Ubuntu. This part will elaborate on the information above in more detail.
First, we need to install the software that is required to make everything work. Considering you are a normal user, we will be using sudo throughout the process.

To enable your clients to boot from the network, install DHCP, TFTP and NFS:

sudo aptitude install isc-dhcp-server tftpd-hpa nfs-kernel-server

Note that, in Ubuntu 12.04, ISC DHCP server is a transitional package for dhcp3-server.

After installing the software, you have to configure DHCP.

Edit the file in /etc/dhcp/dhcpd.conf. Here's a common configuration:

allow booting;
allow bootp;

ddns-update-style none;

default-lease-time 86400;
max-lease-time 86400;

subnet netmask
  option subnet-mask;
  option broadcast-address;
  option domain-name-servers,;
  option routers;

  filename "/pxelinux.0";

  host <name>
      hardware ethernet 00:0a:0b:0c:0d:0e;

If you want another range for clients using DHCP, modify your own configuration accordingly. If you want to assign a specific IP address to a client, modify the host section.

Next, edit the file /etc/default/isc-dhcp-server. This file contains the reference to the interface card that will be handling the DHCP requests:


Save your changes. Your DHCP server is now ready to go.

First, create the directories in which you want to locate your storage (userdata) and boot files for tftp. e.g.

sudo mkdir /mnt/media/storage
sudo mkdir -m777 /mnt/tftpboot

Copy the KERNEL and SYSTEM files into the /mnt/tftpboot directory using

sudo cp KERNEL /mnt/tftpboot
sudo cp SYSTEM /mnt/tftpboot

Then add the following lines to your /etc/exports:

/mnt/tftpboot ,rw,async,no_subtree_check)

That's it for your exports.

First, you need to create some directories. I chose to serve my tftp from a different disk. In the end, tftp will retrieve its bootfiles from this location.

sudo mkdir /mnt/tftpboot/pxelinux.cfg/
sudo cp -p /usr/lib/syslinux/pxelinux.0 /mnt/tftpboot/

At this time, you may also want to copy the KERNEL and SYSTEM files to /mnt/tftpboot/.

Now, insert the following lines into the tftpd-hpa file in /etc/default and save the file:


Next, create a file /mnt/tftpboot/pxelinux.cfg/default, insert the following lines and save the changes:


kernel /KERNEL
append ip=dhcp boot=NFS= disk=NFS=

And that's it. There's nothing more to it to get it to work. Finally, start all services and you're ready to go.

sudo service isc-dhcp-server start
sudo service nfs-kernel-server start
sudo service tftpd-hpa start

Make sure you enter the following rules into your firewall (e.g. ufw):

sudo ufw allow proto udp from to any port 69  (for tftp)
sudo ufw allow proto tcp from to any port 111 (for openelec)

Normally, OpenElec will connect to XBMC through a different (random if you will) port every time you boot the system. With ufw active, everytime you do this, OpenElec will "hang" because there is no firewall rule. So in case you want Openelec to connect through a specific port, you need to modify the mountd options.

vi /etc/default/nfs-kernel-server

Then comment out RPCMOUNTDPOTS and insert the following line:

RPCMOUNTDOPTS="-p <port>" # <port> is a random port, e.g. 13025.

Finally, add a rule for this port to your firewall configuration:

sudo ufw allow proto tcp from to any port 13025