Table of Contents
Install pfSense 2.6.0 Community Edition On PC Engines APU4D4
This howto will guide you through the installation process for pfSense 2.6.0 on a PC Engines APU4D4. You can find generic installation instructions in the netgate documentation.
Sources
Prerequisites
Serial Console Image Download
All commands are assumed to be executed as root.
Download the installer image (360 MB)
cd ~/Downloads wget https://frafiles.netgate.com/mirror/downloads/pfSense-CE-memstick-serial-2.6.0-RELEASE-amd64.img.gz
Alternatively - Browse to the pfSense download page and download the “Latest Stable Version (Community Edition)” (direct link) to your local harddisk.
- Version: 2.6.0
- Architecture: AMD64 (64-bit)
- Installer: USB Memstick Installer
- Console: Serial
- Mirror: <select the mirror server closest to your location>
This should result in a downloaded file “pfSense-CE-memstick-serial-2.6.0-RELEASE-amd64.img.gz” somewhere on your local file system.
Verify the installer integrity
sha256sum -c <<< $(lynx --dump https://www.pfsense.org/hashes/pfSense-CE-memstick-serial-2.6.0-RELEASE-amd64.img.gz.sha256)
pfSense-CE-memstick-serial-2.6.0-RELEASE-amd64.img.gz: OK
Prepare Installation Media
Decompress the installer image (this will result in a 800 MB file)
gzip -d pfSense-CE-memstick-serial-2.6.0-RELEASE-amd64.img.gzPlug the USB flash drive into a USB-port an find its device name
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 238,5G 0 disk ├─sda1 8:1 0 8M 0 part ├─sda2 8:2 0 222,9G 0 part /var │ /usr/local │ /srv │ /root │ /opt │ /home │ /boot/grub2/x86_64-efi │ /boot/grub2/i386-pc │ /.snapshots │ / └─sda3 8:3 0 15,6G 0 part [SWAP] sdb 8:16 1 1,9G 0 disk └─sdb1 8:17 1 1,9G 0 part sr0 11:0 1 1024M 0 rom
The USB flash drive (in my case) is /dev/sdb.
Wipe the partition table of the USB flash drive
dd if=/dev/zero of=/dev/sdb bs=1M count=1
1+0 records in 1+0 records out 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.413913 s, 2.5 MB/s
Now write the installer image to the USB flash drive
dd bs=1M if=./pfSense-CE-memstick-serial-2.6.0-RELEASE-amd64.img of=/dev/sdb && sync
799+1 records in 799+1 records out 837919232 bytes (838 MB, 799 MiB) copied, 142.203 s, 5.9 MB/s
Connect To The Serial Console
Use the USB to serial converter and null modem cable to connect your workstation to the APU4D4 serial port and find the device name of your serial converter
ls -la /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Feb 9 18:51 /dev/ttyUSB0
dmesg | grep ttyUSB
[120741.844003] usb 3-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
so, the device seems to be /dev/ttyUSB0.
check if your terminal is using UTF8 encoding
locale charmap
UTF-8
now connect a terminal to the serial console
screen /dev/ttyUSB0 115200
Installation Of pfSense
Plug the USB flash drive into the USB port of your APU4D4 and power on your device. For boot options press F10.
SeaBIOS (version rel-1.12.1.3-0-g300e8b7) Press F10 key now for boot menu Select boot device: 1. USB MSC Drive Kingston DataTraveler R PMAP 2. AHCI/0: SATA SSD ATA-11 Hard-Disk (15272 MiBytes) 3. Payload [setup] 4. Payload [memtest]
press 1 to boot from the USB flash drive.
Wait for pfSense to finish the autoboot sequence and until a prompt, asking for the console type, will appear
Welcome to pfSense! Please choose the appropriate terminal type for your system. Common console types are: ansi Standard ANSI terminal vt100 VT100 or compatible terminal xterm xterm terminal emulator (or compatible) cons25w cons25w terminal Console type [vt100]:
press ENTER to accept the default vt100 type
┌────────────────────Copyright and distribution notice───────────────────────┐ │ Copyright and Trademark Notices. │ │ │ │ Copyright(c) 2004-2016. Electric Sheep Fencing, LLC ("ESF"). │ │ All Rights Reserved. │ │ │ │ Copyright(c) 2014-2021. Rubicon Communications, LLC d/b/a Netgate │ │ ("Netgate"). │ │ All Rights Reserved. │ │ │ │ All logos, text, and content of ESF and/or Netgate, including underlying │ │ HTML code, designs, and graphics used and/or depicted herein are │ │ protected under United States and international copyright and trademark │ │ laws and treaties, and may not be used or reproduced without the prior │ │ express written permission of ESF and/or Netgate. │ │ │ │ "pfSense" is a registered trademark of ESF, exclusively licensed to │ │ Netgate, and may not be used without the prior express written │ │ permission of ESF and/or Netgate. All other trademarks shown herein are │ │ owned by the respective companies or persons indicated. │ │ │ ├───────────────────────────────────────────────────────────────────────28%──┤ │ <Accept> │ └────────────────────────────────────────────────────────────────────────────┘
press ENTER to accept the copyright and distribution notice
pfSense Installer ────────────────────────────────────────────────────────────────────────────── ┌───────────────────────────────Welcome──────────────────────────────────┐ │ Welcome to pfSense! │ │ ┌────────────────────────────────────────────────────────────────────┐ │ │ │ Install Install pfSense │ │ │ │ Rescue Shell Launch a shell for rescue operations │ │ │ │ Recover config.xml Recover config.xml from a previous install │ │ │ └────────────────────────────────────────────────────────────────────┘ │ │ │ │ │ ├────────────────────────────────────────────────────────────────────────┤ │ < OK > <Cancel> │ └────────────────────────────────────────────────────────────────────────┘
press ENTER to start the installation process
pfSense Installer ────────────────────────────────────────────────────────────────────────────── ┌───────────────────────Keymap Selection──────────────────────────┐ │ The system console driver for pfSense defaults to standard "US" │ │ keyboard map. Other keymaps can be chosen below. │ │ ┌─────────────────────────────────────────────────────────────┐ │ │ │>>> Continue with default keymap │ │ │ │->- Test default keymap │ │ │ │( ) Armenian phonetic layout │ │ │ │( ) Belarusian │ │ │ │( ) Belgian │ │ │ │( ) Belgian (accent keys) │ │ │ │( ) Brazilian (accent keys) │ │ │ │( ) Brazilian (without accent keys) │ │ │ │( ) Bulgarian (BDS) │ │ │ │( ) Bulgarian (Phonetic) │ │ │ │( ) Canadian Bilingual │ │ │ └────┴(+)─────────────────────────────────────────────12%─────┘ │ ├─────────────────────────────────────────────────────────────────┤ │ <Select> <Cancel> │ └──────────────────[Press arrows, TAB or ENTER]───────────────────┘
use the up/down arrow keys (↑/↓) to move to the line with your corresponding keymap, then press ENTER to select it
pfSense Installer ────────────────────────────────────────────────────────────────────────────── ┌───────────────────────Keymap Selection──────────────────────────┐ │ The system console driver for pfSense defaults to standard "US" │ │ keyboard map. Other keymaps can be chosen below. │ │ ┌─────────────────────────────────────────────────────────────┐ │ │ │>>> Continue with de.kbd keymap │ │ │ │->- Test de.kbd keymap │ │ │ │( ) Armenian phonetic layout │ │ │ │( ) Belarusian │ │ │ │( ) Belgian │ │ │ │( ) Belgian (accent keys) │ │ │ │( ) Brazilian (accent keys) │ │ │ │( ) Brazilian (without accent keys) │ │ │ │( ) Bulgarian (BDS) │ │ │ │( ) Bulgarian (Phonetic) │ │ │ │( ) Canadian Bilingual │ │ │ └────┴(+)─────────────────────────────────────────────12%─────┘ │ ├─────────────────────────────────────────────────────────────────┤ │ <Select> <Cancel> │ └──────────────────[Press arrows, TAB or ENTER]───────────────────┘ Test the currently selected keymap
press up arrow key (↑) and then ENTER to use the selected keymap
pfSense Installer ────────────────────────────────────────────────────────────────────────────── ┌──────────────────────────Partitioning─────────────────────────────┐ │ How would you like to partition your disk? │ │ ┌───────────────────────────────────────────────────────────────┐ │ │ │ Auto (ZFS) Guided Root-on-ZFS │ │ │ │ Auto (UFS) BIOS Guided Disk Setup using BIOS boot method │ │ │ │ Auto (UFS) UEFI Guided Disk Setup using UEFI boot method │ │ │ │ Manual Manual Disk Setup (experts) │ │ │ │ Shell Open a shell and partition by hand │ │ │ └───────────────────────────────────────────────────────────────┘ │ │ │ │ │ ├───────────────────────────────────────────────────────────────────┤ │ < OK > <Cancel> │ └───────────────────────────────────────────────────────────────────┘
press ENTER to go with the default “Guided Root-on-ZFS” option
pfSense Installer ────────────────────────────────────────────────────────────────────────────── ┌────────────────ZFS Configuration───────────────────┐ │ Configure Options: │ │ ┌────────────────────────────────────────────────┐ │ │ │ >>> Install Proceed with Installation │ │ │ │ T Pool Type/Disks: stripe: 0 disks │ │ │ │ - Rescan Devices * │ │ │ │ - Disk Info * │ │ │ │ N Pool Name pfSense │ │ │ │ 4 Force 4K Sectors? YES │ │ │ │ E Encrypt Disks? NO │ │ │ │ P Partition Scheme GPT (BIOS) │ │ │ │ S Swap Size 1g │ │ │ │ M Mirror Swap? NO │ │ │ │ W Encrypt Swap? NO │ │ │ └────────────────────────────────────────────────┘ │ ├────────────────────────────────────────────────────┤ │ <Select> <Cancel> │ └────────────────────────────────────────────────────┘ Create ZFS boot pool with displayed options
press ENTER to accept the selected partition and filesystem options and to proceed with installation
pfSense Installer ────────────────────────────────────────────────────────────────────────────── ┌─────────────ZFS Configuration───────────────┐ │ Select Virtual Device type: │ │ ┌─────────────────────────────────────────┐ │ │ │ stripe Stripe - No Redundancy │ │ │ │ mirror Mirror - n-Way Mirroring │ │ │ │ raid10 RAID 1+0 - n x 2-Way Mirrors │ │ │ │ raidz1 RAID-Z1 - Single Redundant RAID │ │ │ │ raidz2 RAID-Z2 - Double Redundant RAID │ │ │ │ raidz3 RAID-Z3 - Triple Redundant RAID │ │ │ └─────────────────────────────────────────┘ │ ├─────────────────────────────────────────────┤ │ < OK > <Cancel> │ └────────[Press arrows, TAB or ENTER]─────────┘ [1+ Disks] Striping provides maximum storage but no redundancy
press ENTER to accept the selected ZFS configuration options (Stripe - No Redundancy) and to proceed with installation
pfSense Installer ────────────────────────────────────────────────────────────────────────────── ┌──ZFS Configuration────┐ │ ┌───────────────────┐ │ │ │[ ] ada0 SATA SSD │ │ │ │[ ] da0 │ │ │ └───────────────────┘ │ ├───────────────────────┤ │ < OK > < Back > │ └───────────────────────┘
press SPACE select ada0 and then ENTER to proceed with the installation
pfSense Installer ────────────────────────────────────────────────────────────────────────────── ┌──────────────ZFS Configuration─────────────────┐ │ Last Chance! Are you sure you want to destroy │ │ the current contents of the following disks: │ │ │ │ ada0 │ │ │ ├────────────────────────────────────────────────┤ │ < YES > < NO > │ └─────────[Press arrows, TAB or ENTER]───────────┘
press left arrow key (←) and then ENTER to install pfSense to the mSATA SSD
pfSense Installer ────────────────────────────────────────────────────────────────────────────── ┌───────Manual Configuration──────────┐ │ The installation is now finished. │ │ Before exiting the installer, would │ │ you like to open a shell in the new │ │ system to make any final manual │ │ modifications? │ ├─────────────────────────────────────┤ │ < Yes > < No > │ └─────────────────────────────────────┘
press ENTER to continue
pfSense Installer ────────────────────────────────────────────────────────────────────────────── ┌─────────Complete───────────┐ │ Installation of pfSense │ │ complete! Would you like │ │ to reboot into the │ │ installed system now? │ ├────────────────────────────┤ │ <Reboot> <Shell > │ └────────────────────────────┘
press ENTER to reboot into the installed pfSense system.
When pfSense has booted up, you can connect a computer to eth1 and let it get an IP configuration via DHCP. Then use a browser to connect to the web configuration GUI of pfSense at https://192.168.1.1/. The default user name is “admin” and the password is “pfsense”.
~~DISCUSSION~~