pfSense Full install for WRAP embedded router


UNSUPPORTED: This may wreck your install, kill your cat, burn down your house, or hundreds of other nasty things, none of which should be blamed on the pfSense developers.

pfSense already provides a special version for embedded platforms as a compact flash drive image. It has a number of customizations, including running read-only (to save your flash drive) and booting without a keyboard or video card. However, if you have a hard drive based MicroDrive CF card, you don't really need the special flash restrictions, and can use the full install. But the full install won't boot on a WRAP due to the lack of keyboard and video...

These instructions will help you get a full install of pfSense which will still boot on the WRAP. The current version as I write this is 1.0-BETA3. I will update this to 1.0 Release, and plan to keep it up to date until it is obsoleted by more customization in the install/update of pfSense.

Requirements
* WRAP embedded PC
* Compact Flash Type II MicroDrive card (if it doesn't have moving parts, this WILL destroy the card post haste! No flash!)
* CF to PCMCIA or CF to USB adapter
* x86 PC with CD-ROM drive
* Floppy drive or USB thumb drive or network for above PC

Installing pfSense Full
* Fetch the pfSense Live CD/Installer from pfsense.com
* Using a USB cradle or cardbus adapter, attach your microdrive to a PC with a CD drive
* Boot the PC using the LiveCD
* Perform a new full install on the microdrive. I followed all the defaults, and installed the bootloader only on the microdrive.

Fixing things for WRAP
* Reboot, using the LiveCD again
* Enter the shell (8)
* Mount the microdrive for editing (change ad4 to whatever device is detected)
mount /dev/ad4s1a /mnt
* Fix up the fstab
vi /mnt/etc/fstab # replace ad4 with ad0
* Fetch the pfSense Embedded image from pfsense.com to /mnt/root. If the PC has a network connection you can use, that is preferable:
cd /mnt/root
fetch http://url/to/pfSense-Embedded.img.gz
Otherwise, download the image on another machine and transfer it via a MS-DOS formatted thumbdrive:
cd /mnt/root
mount_msdos /dev/da0a /mnt/mnt
cp pfSense-Embedded.img.gz .
umount /mnt/mnt
* Mount the Embedded image:
cd /mnt/root
gunzip pfSense-Embedded.img.gz
mdconfig -a -t vnode -f pfSense-Embedded.img
mkdir /tmp/mnt/embedded
mount /dev/md8a /tmp/mnt/embedded
* Copy the embedded kernel
rm -rf /mnt/boot/kernel
cpdup /tmp/mnt/boot/kernel /mnt/boot/kernel
* Enable serial console
cat /tmp/mnt/embedded/etc/ttys >> /mnt/etc/ttys
vi /mnt/etc/ttys # delete the first console entry
* Protect the embedded kernel:
chflags schg /mnt/boot/kernel
Optional
* Tuning

Using VMware to Perform the Install

VMware makes it very easy to perform this type of installation if you have a USB Compact Flash writer.

  1. Create a VM with USB redirection.
  2. Unplug your CF writer from your PC.
  3. Plug your Microdrive into your CF writer.
  4. Start the virtual machine, and click inside the VM to give it focus.
  5. Plug the CF writer into your PC. The VM will pick up the USB device, and the pfSense installer CD will recognize the Microdrive as a hard drive.
  6. Continue through these instructions the same as you would for a "normal" installation.