Home arrow Guides arrow Boot FreeBSD From Local Network with PXE
Boot FreeBSD From Local Network with PXE PDF
Sunday, 10 July 2011
This tutorial is about how to boot a FreeBSD system from your local network using PXE, in order to install FreeBSD from network or make a network bootable rescue system.

Step. We configure TFTP Server
TFTP server uses inetd so we will activate inetd:

We edit /etc/inetd.conf and uncomment the following line, and at the end of line we change the path where files for our FreeBSD pxeboot will be placed to our own path:

tftp    dgram    udp    wait    root    /usr/libexec/tftpd    tftpd -l -s /usr/home/drive/netboot/pxeroot

Then we add the following line in /etc/rc.conf to start inetd services at boot:


Then we start inetd servies:

  /etc/rc.d/inetd start

Step. We Configure NFS Server to export our pxeroot directory
To configure a NFS Server we add the following lines to /etc/rc.conf:

part of /etc/rc.conf to configure a NFS Server

Then we edit /etc/exports file where all directories that must be exported by NFS are placed:
/usr/home/drive/netboot/pxeroot -maproot=root -network -mask

We then start NFS server services:

  nfsd -u -t -n 4
  mountd -r

Important! After you change /etc/exports file you must reload mountd service.
You can acompilish that by doing:

  /etc/rc.d/mountd onereload

Step 1. We Install and Configure a DHCP Server

  cd /usr/ports/net/isc-dhcp31-server
  make install clean

We create DHCP server config file: /usr/local/etc/dhcpd.conf
default-lease-time 3100;
max-lease-time 604800;
ddns-update-style ad-hoc;
option domain-name "local.domain";
option domain-name-servers;

subnet netmask {
option routers;
option domain-name "local.domain";
option domain-name-servers;
filename "boot/pxeboot";
option root-path "/usr/home/drive/netboot/pxeroot";

We edit /etc/rc.conf and add a line to start DHCP server at boot:


We start DHCP server:

  /usr/local/etc/rc.d/isc-dhcpd start

Step. We prepare installation files of a FreeBSD system

In order to do that we use files from official FreeBSD CD ISO.

  cd /usr/home/drive/netboot/pxeroot
  fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/8.2/FreeBSD-8.2-RELEASE-i386-memstick.img
  tar -xvpf FreeBSD-8.2-RELEASE-i386-memstick.img

We will need to give full access to /usr/home/drive/netboot/pxeroot in order for tftp to work.

  cd /usr/home/drive/netboot/pxeroot
  find ./ -type -d -print0 | xargs -0 chmod 755
  find ./ -type -f -print0 | xargs -0 chmod 644

Last Updated ( Thursday, 16 February 2012 )
< Prev   Next >

Other BSD Systems





Best BSD firewall?