Netgate m1n1wall

Author Topic: How to install Pfsense on a Compact Flash (CF)  (Read 25888 times)

0 Members and 1 Guest are viewing this topic.

Offline DamienD

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
How to install Pfsense on a Compact Flash (CF)
« on: November 15, 2007, 12:12:39 pm »
Hello,

First I have to tell you that I'm not a freebsd specialist! I learned this method from an another French forum on FreeNAS so feel free to correct me if i'm wrong!!!
I searched the pFsense docs but found nothing on this problem so I decided to share the solution of my problem here...

I have been using pFsense for a long time and always thought of installing it to a cf...

The other day I tried it on my LEX CV860A system with a Sandisk extreme III 1GB CF with pfSense-1.2-RC3-LiveCD.

I got an error message (more or less like this one):

Code: [Select]
ad1: TIMEOUT - READ_DMA retrying (1 retry left) LBA=0
ad1: TIMEOUT - READ_DMA retrying (0 retries left) LBA=0
ad1: FAILURE - READ_DMA timed out LBA=0
ad1: TIMEOUT - READ_DMA retrying (1 retry left) LBA=1
ad1: TIMEOUT - READ_DMA retrying (0 retries left) LBA=1
ad1: FAILURE - READ_DMA timed out LBA=1
ad1: TIMEOUT - READ_DMA retrying (1 retry left) LBA=0
ad1: TIMEOUT - READ_DMA retrying (0 retries left) LBA=0
ad1: FAILURE - READ_DMA timed out LBA=0

I let the installer run for a loooong time and finally I had access to the installer but was unable to install pFsense to the unrecognised CF...  :-(

The solution is:

-- Boot with LiveCD

-- Do not use the default boot but exit to prompt

-- Type (with enter between lines :-D ):

Code: [Select]
set hw.ata.ata_dma=0
boot

-- Do your install (remember, put enough RAM and don't use SWAP!!!)

-- On the first reboot on the CF with pFsense, use once again the same method:

-- Do not use the default boot but exit to prompt

-- Type:

Code: [Select]
set hw.ata.ata_dma=0
boot

-- Once the boot is completed, go to shell and type:

Code: [Select]
echo "hw.ata.ata_dma=0" >> /boot/loader.conf
exit

Login in the webGUI,
Do not install any plugins, edit your "/etc/platform" from "pfSense" to "embedded" and reboot...

Voila! you should now be able to use your new cf-based pFsense!!!

Sorry If I made some mistakes, French is my mothertongue...

Regards!
« Last Edit: November 15, 2007, 12:16:29 pm by DamienD »

Online GruensFroeschli

  • Green Frog
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5058
  • No i will not fix your computer!
    • View Profile
    • FFXI related
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #1 on: November 15, 2007, 12:41:34 pm »
We do what we must, because we can.
(Except when you PM me to help you directly - DONT: keep your issues in the forum)

Offline DamienD

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #2 on: November 15, 2007, 12:50:41 pm »
Or you could just follow this link
http://doc.pfsense.org/index.php/HOWTO_Install_pfSense#Embedded_.28Compact_Flash.29_Installation
and do it the normal way ;)

Well, in fact If you want the "full" version...with video support, it does not work with your method... ;-)
« Last Edit: November 15, 2007, 12:53:14 pm by DamienD »

Online GruensFroeschli

  • Green Frog
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5058
  • No i will not fix your computer!
    • View Profile
    • FFXI related
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #3 on: November 15, 2007, 12:55:05 pm »
We do what we must, because we can.
(Except when you PM me to help you directly - DONT: keep your issues in the forum)

Offline Master One

  • Jr. Member
  • **
  • Posts: 47
    • View Profile
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #4 on: April 05, 2008, 03:49:57 pm »
This is quite interesting, because I was just thinking of doing a full installation on an internal 512 MB USB FLASH module, before I choose to perform a full installation on a regular 80GB IDE harddrive (I also have a 128 MB IDE DOM here, but using the embedded image is not an option for my machine with the Intel Desktop Board D201GLY2A, because of this UP kernel config issue preventing it to boot).

Is it really all it takes, to just switch to the embedded profile by changing "pfSense" to "embedded" in /etc/platform?

Then why exactly is this method not supported, if it solved a lot of issues for application on a regular (= non-embedded) machine with any kind of flash memory as replacement for a harddrive?

Offline hoba

  • Administrator
  • Hero Member
  • *****
  • Posts: 5837
  • What was the problem to this solution again?
    • View Profile
    • pfSense
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #5 on: April 05, 2008, 03:56:06 pm »
There are 2 other options how to install the full version to a flashmedia. Use vmware and hook up the cfcard in a usb-reader connected to the vm. Then simply boot the livecd iso (you don't even have to burn it) and install it to the cf. Once it is powered down again ove it around to the hardware that you want to use (you will most likely have to reassign interfaces on bootup though). Other option is to create a small hdd in vmware and install the iso to that one. The binary vmware diskfile can be written using physdiskwrite or dd to the cfcard.

These methods are still not supported though  ;)

Offline Cry Havok

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2791
  • Backup: n. What you should have done yesterday.
    • View Profile
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #6 on: April 06, 2008, 02:21:31 am »
Amongst other reasons, I suspect it isn't supported because (as you'd know if you searched) CF etc have a limited write-lifecycle.  This means that using them as a replacement for a hard disk will cause them to fail.  How long that takes depends on the media, it's history and how you (ab)use it.
If you're planning on PMing me to ask me to look at a thread, or for individual support, don't.

Offline Master One

  • Jr. Member
  • **
  • Posts: 47
    • View Profile
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #7 on: April 06, 2008, 08:01:30 am »
Isn't that the point, to switch to the embedded profile by changing "pfSense" to "embedded" in /etc/platform after doing a full install to a flash media?

Offline hoba

  • Administrator
  • Hero Member
  • *****
  • Posts: 5837
  • What was the problem to this solution again?
    • View Profile
    • pfSense
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #8 on: April 06, 2008, 08:47:44 am »
You can do so but it's not officially supported.

Offline valnar

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #9 on: April 06, 2008, 08:00:08 pm »
There are 2 other options how to install the full version to a flashmedia. Use vmware and hook up the cfcard in a usb-reader connected to the vm. Then simply boot the livecd iso (you don't even have to burn it) and install it to the cf. Once it is powered down again ove it around to the hardware that you want to use (you will most likely have to reassign interfaces on bootup though). Other option is to create a small hdd in vmware and install the iso to that one. The binary vmware diskfile can be written using physdiskwrite or dd to the cfcard.

These methods are still not supported though  ;)

You can physdiskwrite the actual VMWare .vmdk file directly to a microdrive and have it work?  I tried doing a full install from a CD to my 4GB Hitachi microdrive the other day and it never finished installing.  It was stuck somewhere in the process.  I've been trying to think of an alternate method of getting it on there.

Robert

Offline hoba

  • Administrator
  • Hero Member
  • *****
  • Posts: 5837
  • What was the problem to this solution again?
    • View Profile
    • pfSense
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #10 on: April 06, 2008, 10:09:48 pm »
Yes, Seth pointed that out to me. That's how he got his custom image on his alix.

Offline Ben.K

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: How to install Pfsense on a Compact Flash (CF)
« Reply #11 on: November 30, 2008, 04:16:16 pm »
Knowing full well that this installation is unsupported- is there any known reason why an NFS mount point couldn't be used to also add packages?