Diskless FreeBSD (PXE/NFS)

Prepare the host system

by ross at 10:30:49 on October 6, 2012

Prepare NFS

If you need help activating NFS support refer to the Handbook.

I export the entire /share directory (it contains other stuff needed by clients). Because of that I need -alldirs parameter (so the client can mount /share/lanboot/FreeBSD-9.0 as /).

For UFS filesystem add to /etc/exports:

/share          -ro -alldirs -maproot=root -network= -mask=

For ZFS run this command (replace poolname with your pool):

# zfs set \
  sharenfs="-ro -alldirs -maproot=root -network -mask" \

Apply the changes:

# service mountd onereload

You can test if it's exported by running showmount -e command.

Prepare TFTP

Add to /etc/rc.conf:

# Enable inetd

Uncomment and edit the tftp line in /etc/inetd.conf:

tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /share/lanboot

Start inetd:

# service inetd start

Prepare DHCP

Install the dhcpd server, add to /usr/local/etc/dhcpd.conf to your subnet section:

# IP address of TFTP server:
# The path relative to TFTP root (-s parameter in inetd.conf):
filename "FreeBSD-9.0/boot/pxeboot";
# NFS path to be mounted as root fs:
option root-path "";

Restart the daemon:

# service isc-dhcpd restart 



I'm testing the diskless, but in the client boot return this error in server.

tftpd[94164]: Got ERROR packet: TFTP Aborted

And the client don't complete boot process.

Help me.

-- Felipe
Friday, March 15, 2013, 18:34:34
Sorry, I've never seen this error on my diskless machines. Are you sure you do everything strictly as described in the article?
-- ross
Saturday, March 16, 2013, 4:55:03

I debuged the tftp and the nfs, everything ok.

But the diskless machine don't break boot.
-- Felipe
Monday, March 18, 2013, 18:24:45

"don't break boot"

*break boot
-- Felipe
Monday, March 18, 2013, 18:26:11
Solved, thanks
-- Felipe
Friday, April 12, 2013, 20:07:42