C
Craig Rodrigues
Guest
Some FreeNAS users have been asking how to do an installation of FreeNAS over PXE. While it is not currently officially supported by the FreeNAS development team, it is possible as of FreeNAS 9.2.0 and higher.
At iXsystems, the FreeNAS developers use PXE for booting new machines in our development lab and installing them over the network in new versions of FreeNAS. This saves us some time during development, since we do not have to install via a USB drive.
If you want try this out, you will need:
(1) One machine which you want to install FreeNAS on.
(2) A second machine running FreeBSD, which will be the PXE server.
(3) A FreeNAS installation ISO, obtained from http://download.freenas.org .
NOTE: PXE booting the FreeNAS installer only works for versions 9.2.0 and higher.
(4) The pxe-config.sh script.
A. RETRIEVE THE PXE CONFIG SCRIPT
B. SET UP FREEBSD PXE SERVER
C. PXE BOOTING THE FREENAS INSTALLER
If you have sucessfully configured your PXE server in section B., you should be able to configure your machine which you want to install FreeNAS on so that it can boot over the network. This can usually be done by going into the BIOS, and changing the boot order so that it boots from network first.
We recommend that for doing this, you get an Ethernet switch which is completely disconnected from any network. You can then plug in your PXE server and target machine into this switch. It is best to do this on an isolated network, since DHCP is required for PXE. You don't want the DHCP used for PXE to interfere with your home Internet connection, which also uses DHCP.
Refer to:
http://www.freebsd.org/doc/handbook/network-pxe-nfs.html
for diagnosing and debugging problems with PXE.
At iXsystems, the FreeNAS developers use PXE for booting new machines in our development lab and installing them over the network in new versions of FreeNAS. This saves us some time during development, since we do not have to install via a USB drive.
If you want try this out, you will need:
(1) One machine which you want to install FreeNAS on.
(2) A second machine running FreeBSD, which will be the PXE server.
(3) A FreeNAS installation ISO, obtained from http://download.freenas.org .
NOTE: PXE booting the FreeNAS installer only works for versions 9.2.0 and higher.
(4) The pxe-config.sh script.
A. RETRIEVE THE PXE CONFIG SCRIPT
- Follow the instructions at http://doc.freenas.org/index.php/Test_Upcoming_Versions for obtaining the FreeNAS source code from github. After obtaining the source code, look in the test/pxe directory for the pxe-config.sh script.
- Alternatively, if you do not want to download all the FreeNAS source code, you can get the script from github at https://github.com/freenas/freenas/tree/master/test/pxe/
B. SET UP FREEBSD PXE SERVER
- Copy the pxe-config.sh script to the FreeBSD PXE server.
- Create a directory on the FreeBSD PXE server, /usr/jails/pxeserver/images
- Copy the FreeNAS installation ISO to /usr/jails/pxeserver/images
- Run the pxe-config.sh script, select the ISO in the menu. This will extract the contents of the ISO file.
- Read this document: http://www.freebsd.org/doc/handbook/network-pxe-nfs.html and use that as a guideline for setting up a PXE server.
- make sure that /usr/jails/pxeserver/images/boot_dir is NFS exported in /etc/exports
- make sure that you can use an NFS client to mount "pxehostname:/usr/jails/pxeserver/images/boot_dir", where "pxehostname" is the hostname or IP address of your PXE server.
- make sure that in /etc/inetd.conf the tftp server is set up so that you the tftpd server is started with: "tftpd -l -s /usr/jails/pxeserver/images/boot_dir".
- make sure that you can connect use a TFTP client to connect to the PXE server and retrieve the file "boot/pxeboot".
- Configure a dhcpd.conf file so that the "filename" value is set to the value of the file you can retrieve via TFTP.
- Make sure that option-root-path is set to the value that you can NFS mount /usr/jails/pxeserver/images/boot_dir.
C. PXE BOOTING THE FREENAS INSTALLER
If you have sucessfully configured your PXE server in section B., you should be able to configure your machine which you want to install FreeNAS on so that it can boot over the network. This can usually be done by going into the BIOS, and changing the boot order so that it boots from network first.
We recommend that for doing this, you get an Ethernet switch which is completely disconnected from any network. You can then plug in your PXE server and target machine into this switch. It is best to do this on an isolated network, since DHCP is required for PXE. You don't want the DHCP used for PXE to interfere with your home Internet connection, which also uses DHCP.
Refer to:
http://www.freebsd.org/doc/handbook/network-pxe-nfs.html
for diagnosing and debugging problems with PXE.