Installing pfSense on a Compact Flash card

I purchased a Netgate ALIX.2d3 to use for a pfSense Firewall.  It runs pfSense off of a Compact Flash (CF) card.  The trick is getting pfSense installed onto the CF card.  Once I got the process figured out, it was really quite simple.  I used a Windows 7 computer to accomplish this.

To Load it up…

  1. Download pfSense from one of the mirrors here. You’ll need the nanobsd version (depending upon the size of your CF card, you can choose to download the most appropriate nanobsd img.gz file.  Store it in an folder easily accessed from a command line like c:\pfsense.  I also renamed my download to something simple like pfsense-2.0.img.gz.
  2. Download physdiskwrite, unzip it, and place the physdiskwrite.exe in your c:\pfsense directory.
  3. Gather a CF card reader and plug it into your computer.
  4. Format your CF card.  This is necessary for physdiskwrite.exe to work correctly.
    • Open up a command prompt as Administrator and type “diskpart”, then hit “Enter”
    • Type “list disk” and hit enter
    • Type “select disk x” (where x = the disk number of your CF card from the last step)
    • Type “clean” and hit enter
    • Type “exit” when diskpart has finished cleaning the disk. Type “exit” to quit diskpart.
  5. In your command prompt navigate to your c:\pfsense directory and type “physdiskwrite -u pfsense-2.0.img.gz” and hit enter (be sure to use the name of your pfSense image at the end of that statement).
  6. You’ll see a listing of drives.  Make note of which drive number is you CF card and then enter that number after the question “Which disk do you want to write?” and hit enter.  (For example: PhysicalDrive1 = disk 1 so enter 1 and hit enter)
  7. If your CF card is larger than 2 GB you will be prompted with a “Proceed?” question.  Type “y” and hit enter.  (By the way the “-u” switch in the command line in step 4 allows you to write to a CF card larger than 2 GB.)
  8. You will now see the bytes begin to copy over to the CF card.  Once completed, eject the card from the reader and plug it into your Alix board.  Connect a null serial cable to the board.  Plug in the power.  Pull up a Serial Client like Hyperterminal or Putty and connect to the  Alix.  You may proceed from there to configure pfSense as your firewall.

By no means am I an expert at this.  It’s my first attempt!  Please feel free to share any pointers you may have come across if you have done or are doing something similar!

5 Responses to Installing pfSense on a Compact Flash card

  1. Satvik M. says:

    Hey, great article. I’m working on one of these now, and I’ve gotten up to opening physdiskwrite -u pfsense-2.0.img.gz and getting Proceed? (y/n). I type y, and I get “failed to open \\.\PhysicalDrive1. And it exits the program. I’d like to know what went wrong here, and what I can do about it. Cheers, Satvik.

  2. Hmeister says:

    Hi Goodger…

    How much did you pay for the ALIX box – board combo?
    Are you running version 2rc1?
    If so what is the default IP address your using putty on once you write to the CF?
    I have too been working with FreeBSD and PFSense building out x700-x500 Watchguards…
    I like the smaller size and will check out the specs on this combo…

    Thx…
    Hmeister…

    • sgoodger says:

      I think I paid about $200 for the board. I did load the latest release candidate. The putty address is the LAN address that I manually assigned during the initial PfSense install process.

  3. Ramslin Swedi says:

    Myself I would like to say thank you for clear information, I did step by step and it went perfect

  4. Pingback: pfsense 2.3 upgrade on Alix – Riaan's SysAdmin Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: