Configure PXE Booting on pfSense

PXE Booting on pfSense.docx

How to boot a bare metal server on LAN! 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 🙂

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.

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!

Install Google Fonts on Ubuntu/LinuxMint

Install Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip
sudo chmod -R --reference=/usr/share/fonts/opentype /usr/share/fonts/googlefonts

Register fonts

sudo fc-cache -fv

Check if font installed

fc-match OpenSans

 

You can also install some of these fonts (My Favorite Roboto) as packages on newer ubuntu 18.04 +

sudo apt install fonts-lato fonts-open-sans fonts-roboto fonts-mononoki

Download a single directory from a GitHub repo using Subversion

Download a single folder or directory from a GitHub repo using a subversion command: like “$svn checkout”

svnEXAMPLE:

https://github.com/facebook/docusaurus/tree/master/packages/docusaurus-1.x/examples/basics

#Modify the URL for subversion. Replace tree/master with trunk.

$ svn checkout https://github.com/facebook/docusaurus/trunk/packages/docusaurus-1.x/examples/basics

 

SENDING FILES WITH SCP & WORMHOLE

$ scp -p FILE.zip USER@192.x.x.x:access_media/

#Copy files inside directory recursively
#“-r”
$ scp -p -r DIR/ USER@192.x.x.x:access_media/

#compressing & copying a lot files across the network
#“-C”

put it all together,
$ scp -Cpr DIR/ USER@192.x.x.x:access_media/

 

WORMHOLE
Wormhole is a Fast, Secure Way to Send Files to Other Users Through the CLI
$ sudo snap install wormhole

$ wormhole send FILENAME.ZIP

#ON THE OTHER COMPUTER DO:
$ wormhole receive codeXYZ