# Linux with Squid on a Compact Flash Card

## Uwe

Hello Community,

I am thinking about building a little Firewall-System out of a Linux Distro (preferably Gentoo but perhaps Debian because of the smaller footprint). My Idea is buying a fanless Mini-ITX PC with a 533 Mhz Eden CPU and three NICs and Installing the OS on a CF Card. The System should contain Squid, Iptables, and Apache (perhaps OpenVPN/Openswan at a later time).

I read that CF Cards have a limited lifetime/write-cycle time, so I wonder how long a CF Card would live being used as Squid Cache Disk. I already successfully installed a Gentoo and a SuSE System on a CF Card with that Hardware, so the general functionality isnt my Problem. I would be more interested in how long the CF card would probably live under that Circumstances...?

Anyone out there with some experience on that Topic?

----------

## Zepp

wikipedia seems to think its about 300,000 erase/write cycles. personally never had any flash media long enough (or use it enough times) to wear it out.

----------

## Voltago

Uwe, you could use the CF card as read-only root filesystem, and store squid cache data in a RAM filesystem.

----------

## Uwe

Problem is that the Epia Machines are limited in their RAM size...

What about IBM Microdrives? Are they reliable like a CF Card or is the possibility that they crash too high (like a normal HDD?)

(btw. I found a rather cheap solution: There is a FreeBSD based Project called pfSense, the OS runs on a specialized Hardware called WRAP (Wireless Router Application Platform) that costs ~160 with every parts you need (including the CF Card)... But it doesnt feature proxy-caching (read-only, too, probably for a good reason  :Wink: ), and thats the mail reason why I wanna run such a thing (because mit Inet Connection is horribly slow  :Wink: ) damn thing is that it wont run with Microdrives  :Sad: ).

----------

## Zepp

don't most mini-itx boards support at least 1gb of ram?

----------

## Uwe

The one i thought of supports up to 512 MB but that would require me having one 512 MB Module  :Wink: . As I have tons of 256 MB Modules lying around I prefer the cheaper solution  :Wink: 

----------

## Zepp

Ok, well you could probably find a pretty quiet laptop hard drive. Depending on the case maybe you could suspend it or something to make it even quieter. If that is the goal anyway.

----------

## Uwe

Probolem is the reliability.... A single HDD will crash sooner or later :/

----------

## Voltago

 *Uwe wrote:*   

> Probolem is the reliability.... A single HDD will crash sooner or later :/

 

Well, so what? Cache data is transient data anyway. Get a cheap used HDD from ebay, use it until it breaks, get another one. For your linux system, use a CF card.

----------

## Uwe

*gg yep that was my thought too, if the machine would have two IDE channels  :Wink: 

----------

## Voltago

What about USB 2.0?

----------

## Uwe

hehe nope ^^

atm i think about

a) no cache

b) cache in a ramdisk, even 50mb should be sufficient :/

c) risking to kill the cf card

----------

## Zepp

The board doesn't have usb 2.0  :Neutral: , no firewire then too i presume?

----------

## Uwe

hehe yep  :Smile: 

but it would perhaps be possible to mount the cache via NFS on a Server thats also on that Net... perhaps  :Smile: 

----------

## Bojan

 *Uwe wrote:*   

> Probolem is the reliability.... A single HDD will crash sooner or later :/

 

I really don't see why you're so reluctant to use a HDD. 

It'll crash, of course, but a simple smartctl -A /dev/hdxx will (hopefully) tell you when this will happen. 

In my experience hard disks don't die SO frequently; once in two years perhaps.

And even in that case a regular stage4 backup will get you back in bussiness in almost no time.

----------

## Voltago

 *Uwe wrote:*   

> *gg yep that was my thought too, if the machine would have two IDE channels 

 

Hold on... you can use two devices on one IDE channel.

----------

## richard.scott

 *Voltago wrote:*   

> Uwe, you could use the CF card as read-only root filesystem, and store squid cache data in a RAM filesystem.

 

Have you seen the Gentoo Network Appliance (GNAP) Project?

This is exactly what your looking for!   :Cool: 

----------

## Uwe

Hi,

I solved it in the meantime with Voyage Linux which is a debian-based distrib...

the hardware is a PC Engines WRAP with a 1 GB CF Card... I installed Voyage Linux on a 400MB read-only partition and the cache resides on the secon r/w partition. I believe that even when the CF card's write cycles are reached, it will only affect the second partition, hopefully not destroying teh installation.... well, we will see...

----------

