2.1 + ZFS Mirror Installation Instructions



  • I'm just posting this as it might be of use to someone else.  It's what works for me, YMMV.

    - Boot pfSense 2.1 LiveCD
      - Get an accessible IP on an interface and enable SSH
      - Enter command line and disable pf:```
    pfctl -d

      - Visit the website:```
    https://<ip address="">/installer</ip>
    

    - Login with admin/pfsense
        - You will probably need to retype the installer URL
        - Choose custom install
          - Set the boot manager to BSD
          - Set the Filesystem of line 1 to ZFS
          - Set the size of that line to an appropriate round number (120GB drive ~ 98304)
          - Remove the SWAP line (optional)
          - Begin the installation & wait until 100% complete
        - SSH into the LiveCD OS
          - Fix the installation bugs:
            - Mount the ZFS:```
    mount -t zfs tank0 /mnt

            - Change the installation platform from 'cdrom' to 'pfSense':```
    ee /mnt/etc/platform
    

    - Setup the compact flash virtual configuration directory:```
    mkdir -p /mnt/cf/conf

            - Copy the empty configuration file:```
    cp /mnt/conf.default/config.xml /mnt/cf/conf/config.xml
    

    - Unmount the ZFS:```
    umount /mnt

          - Create the ZFS mirror, if applicable (assuming drive 1 is ad4, drive 2 is ad6).
            - Delete all partitions on drive 2:```
    
    gpart delete -i 1 ad6
    gpart destroy ad6
    
    

    - Clone the drive 1 partition table & boot sectors:```

    gpart backup /dev/ad4 | gpart restore /dev/ad6
    gpart backup /dev/ad4s1 | gpart restore /dev/ad6s1
    dd if=/boot/zfsboot of=/dev/ad6s1 count=1
    dd if=/boot/zfsboot of=/dev/ad6s1a skip=1 seek=1024

            - Add the ZFS mirror:```
    zpool attach tank0 ad4s1a ad6s1a
    

    - Install the bootloaders on drive 2:```
    gpart bootcode -b /boot/boot0 ad6

      - Reboot

  • Netgate Administrator

    Nice.
    So what hardware are you installing that on? Does it actually use compact flash to store the config file?

    Steve



  • We use Supermicro Atom based boards with a mirrored pair of SATA SSDs for web-caching.  We don't use a CF for configuration, we just store the conf on the ZFS mirror.


Log in to reply