Boot diskless FreeBSD9 from Debian PXE server

Last edited
Fun with diskless FreeBSD9 jailserver

Diskless FreeBSD9

FreeBSD is a great operating system for both servers as wel as the desktop. In order to learn more about using FreeBSD jails I did set up a FreeBSD9 server with jails. Recently I modified this system to run diskless. See also disklessservers.

Boot FreeBSD9 over PXE from Debian

As there was allready a Debian PXE server running in my home network for easy installing new systems, I choose to use this server to boot the diskless system.

The work on the PXE system starts with modifying /etc/dhcp/dhcpd.conf. This is the relevant part in my conf file:

host freebsddoos {
        hardware ethernet 01:45:67:89:ab:cd;
        filename "rootfs/freebsd9/boot/pxeboot";
        option root-path "";

The PXE server can resolve the system name into an ip-number.

The location on the filename line ("rootfs/freebsd9/boot/pxeboot") is relative to the root of the tftp path. This path can be found in /etc/default/tftpd-hpa on the Debian PXE server.

The file pxeboot is part of the FreeBSD9 installation and tftp serves this file right out the root filesystem.

The line with the option root-path points to the root filesystem of FreeBSD9 on the NFS server.

Read-only filesystem

When FreeBSD boots diskless over NFS it automaticly mounts its root filesystem read only. Also a small ramdisk is created. The contents of this ramdisk can be managed from the NFS server. Create a directory conf in the root of the root filesystem on the NFS server. So next to /bin, /boot, /etc, and others create a /conf directory. In this directory create a directory calles "base" and a directory called "default".

What you put in these base and default directory gets copied to the ramdisk of the diskless FreeBSD server.

I have created an empty directory /jails in /conf/base. This becomes a empty read writable directory on the diskless server. So now we have a point to mount our iSCSI partition. This results in /jails being a writable filesystem.

I created a directory /jails/etc/ezjails and a symlink to /usr/local/etc/ezjails. This makes /usr/local/etc/ezjails writable so ezjail can administer the creation of jails and the archiving and restoring of them.


I use the FreeBSD9 jailserver in my home network.

The work I do on it is in the jails. I try to do as little as possible on the host itself.

The jails are used for different purposes:

  • Develop web applications with php, mysql and javascript.
  • A seperate jail runs my weechat IRC client
  • A seperate jail runs as X-server to provide a virtual FreeBSD workstation to my X-terminal and my laptops.

The FreeBSD9 jailserver is running on a 600 MHz VIA EPIA ME6000 LVDS Mini-ITX board with 1Gb RAM, so it is not ment to run heavy loads.

For my home usage, this is indeed a workable solution. I didn't have any performance issues. The X-server runs the ratpoison window manager and only light weight applications are run on it. I didn't install Libreoffice or other heavy stuff on it.

My epia boards are a couple of years old now, but are all still running fine. I have almost allways run them without a hard disks, sometimes from USB-stick, and they have proven to be fine, reliable silent machines.


Some pages that where helpfull: