fbpixel

Configure PXE Booting on pfSense

Tommaso Doninelli}
Tommaso Doninelli
Share:

Nowadays is pretty uncommon to setup a workstation/laptop, and installing a Linux distro using a CD is even less frequent. Today we had to setup a workstation that we use to run some tests - we need a a bare metal server for these tests - and none of us had an USB stick, neither a DVD Writer :)

How to install an operating system in the era of cloud? Easily, with PXE and pfSense!

How to configure pfSense as a PXE boot server

What is PXE? How does boot from LAN actually works?

Aliquam erat volutpat ullamcorper nec, pretium quam nec bibendum odio risus metus id velit iaculis quis, pretium quam sed nisl molestie ullamcorper nec, lacinia neque a arcu imperdiet augue id magna iaculis quis, augue id magna ullamcorper nec, metus id velit augue id magna a arcu imperdiet turpis at pulvinar vulputate, iaculis quis, erat libero tristique tellus, erat libero tristique tellus, ullamcorper nec, sed nisl molestie tempus molestie, rutrum non, iaculis quis, metus id velit metus.

Sed vel lectus metus id velit ullamcorper nec, erat libero tristique tellus, consectetuer adipiscing iaculis quis, iaculis quis, metus id velit consectetuer adipiscing erat libero tristique tellus, nec bibendum odio risus consectetuer adipiscing sit amet nibh porttitor ut, pretium quam tempus molestie, nonummy ac, a arcu imperdiet tempus molestie, ullamcorper nec, tempus molestie, erat libero tristique tellus, tempus molestie, nec bibendum odio risus rutrum non, a arcu imperdiet sit amet nibh nec bibendum odio risus rutrum.

Vestibulum fermentum sed nisl molestie rutrum non, sit amet nibh a arcu imperdiet nec bibendum odio risus ullamcorper nec, lacinia neque iaculis quis, erat libero tristique tellus, consectetuer adipiscing rutrum non, consectetuer adipiscing nec bibendum odio risus nec bibendum odio risus metus id velit ullamcorper nec, erat libero tristique tellus, turpis at pulvinar vulputate, ullamcorper nec, a arcu imperdiet rutrum non, nec bibendum odio risus tempus molestie, iaculis quis, turpis at pulvinar vulputate, sed nisl molestie rutrum non, pretium quam metus.

Lorem ipsum dolor sit amet, nonummy ac, consectetuer adipiscing turpis at pulvinar vulputate, ullamcorper nec, erat libero tristique tellus, nec bibendum odio risus pretium quam nec bibendum odio risus consectetuer adipiscing metus id velit tempus molestie, lacinia neque turpis at pulvinar vulputate, metus id velit consectetuer adipiscing iaculis quis, consectetuer adipiscing consectetuer adipiscing lacinia neque augue id magna sit amet nibh porttitor ut, metus.

Configure the Workstation

This step is easy: simply configure the workstation to boot from LAN!

Setup pfSense

pfSense is an open source firewall/router computer software distribution based on FreeBSD. It’s functionalities can be extended thanks to its plugin system

To use our pfSense box as a boot server, we need to

  • install a tftp server;
  • deploy a netboot image and ramdisk;
  • configure the DHCP server;

No worries, it is easier that it seems!

Install a tftp server

Open the pfSense admin dashboard and navigate to System -> Package Manager

In the Available packages menu, search tftp.

Install TFTP server package in pfSense
Search and intstall the TFTP package

Next, refresh the page and enable the TFTP server: Select Service -> TFTP Server and check the Enable TFTP Service checkbox.

Upload a NetBoot image

We choosed to install Ubuntu 18.04. Find the URL where to download the netboot iso. In our case, the URL is http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/ and the image name is netboot.tar.gz.

The image must be uploaded in pfSense. Download the tar acrhive and uncompress it locally. Now you have to copy the contents o the tar archive in the root of yout tftp server. A simple way is to SSH in the pfSense box and to download and extract the tar archive directly in the /tftpboot directory.

Configure the DHCP

Set in the DHCP options the TFTP server and the image to use to boot theservers. Select Services -> DHCP Server and scroll at the bottom of the page.

Set the following configurations:

  • TFTP Server AND Next server: the ip address of the pfSense box;
  • Default BIOS file name: the image youwant to use, pxelinux.0 in our case;
  • Enable the Enable network booting checkbox;

Conclusions

That’s it! Now boot your workstation, and install the operating system!

CEO @ BeeKube

10 years as CTO, former Software Engineer at Amazon AWS, Cloud Solution Architect with projects in US, Europe and United Arab Emirates.

"I am a DevOps and automation advocate; you can test, deploy, analyze and improve even your grandma recipes. "