Netboot

Setting up a netboot server is surprisingly easy, but I have not found comprehensive guides.

What you really need:

  • DHCP Server, from which your client receives an IP-Address and the Address to a tftp server
  • TFTP Server, where a bootloader and one or more images are located

TFTP Server

  • install a tftp server package with support for xinet (that is the normal one)
  • xinetd is a daemon, which listens on specified ports and pipes the traffic to a program one can specify in config. In this case we want a tftp config file, where you can also specify a root path for your tftp server:

    Notice: If you are using SELinux and want to use a directory in a users home directory (like in that example), you will have to tell SELinux about it:

DHCP Server

  • the installation package is most likely called dhcp or dhcp-server or dhcpd. It will not preinstalled in most cases as normal users do not need it.
  • the most important part in our dhcpd.conf-file is the subnet part. It acts like a filter and will only become active for interfaces, which are in the ip range (starting with 192.168.178.0 in the following example).
  • filename “pxelinux.0” loads a bootloader from the syslinux project (think of it as a network grub if you like). This file must be accessible through your previously configured tftp server.

    starting the dhcp server

    After you have modified the addresses and saved the configuration file you can start the dhcpd-daemon:

Firewall

Do not forget to open the firewall ports for DHCP Server (UDP 67,68) and TFTP Server (UDP 69)!

Getting something running…

Put files from the syslinux project in your tftp-root-directy, namely:

  • /usr/share/syslinux/vesamenu.c32
  • /usr/share/syslinux/memdisk
  • KolibriOS – used for testing because it is so damn small 🙂
  • create a path in your TFTP root path, called pxelinux.cfg
  • create a file inside pxelinux.cfg/ called default (without extension) and insert:
  • Now start your network machine!

Troubleshooting

You can run qemu in order to test whether or not your tftp folder is correctly set up:

max,