Instructions for PXE booting FreeBSD 9.x

There have been some changes in how PXE booting works with the release of FreeBSD 9.0. So I wanted to share some of what needs to be done to boot FreeBSD 9.0 via PXE.

The quick notes for people that have done PXE booting on prior versions of FreeBSD is:

See below for a guide on how to get this working.

PXE Booting Guide

Prep the PXE Boot Server host

This is where the DHCP server, NFS Server and PXE Boot server will live. They could all easily live on different machines.

  1. Download the FreeBSD 9 disc1 ISO from here:
  2. Create a directory to store the files in:
    # mkdir /usr/public/freebsd90-amd64
  3. Attach the iso as a device:
    # mdconfig -a -t vnode -f FreeBSD-9.0-RELEASE-amd64-disc1.iso
  4. Mount the device:
    # mount_cd9660 /dev/md0 /mnt
  5. Copy the files over:
    # cp -R /mnt/* /usr/public/freebsd90-amd64
  6. Unmount the device:
    # umount /mnt
  7. Detach the device:
    # mdconfig -d -u 0
  8. Comment out the etc/fstab entry to mount from the cdrom media:
    # vi /usr/public/freebsd90-amd64/etc/fstab
  9. Export the Directory via NFS in /etc/exports:
    /usr/public/freebsd90-amd64 -ro
  10. Restart the mount daemon:
    # pkill -HUP mountd
  11. Create a Directory for tftp files:
    # mkdir /usr/public/tftp
  12. Enable tftp in /etc/inetd.conf:
    tftp    dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /usr/public/tftp
  13. Enable inetd in /etc/rc.conf:
  14. Start inetd:
    # /etc/rc.d/inetd start
  15. Copy over the pxeboot file to the tftp area:
    # cp /usr/public/freebsd90-amd64/boot/pxeboot /usr/public/tftp
  16. Configure DHCPd:
    host fbsd9pxe {
    	hardware ethernet xx:xx:xx:xx:xx:xx;
    	filename "pxeboot";
    	option root-path "/usr/public/freebsd90-amd64/";
  17. Enable DHCPd in /etc/rc.conf:
  18. Start DHCPd:
    /usr/local/etc/rc.d/isc-dhcpd start

Modify the IP addresses and the MAC Address as needed for the environment in dhcpd.conf.

Boot your system

If everything went well you should be presented with the Installer ready to go.

Powered by FreeBSD! r4l domain registration