LEX NEO – A fanless CF-Boot Setup

This tutorial tries to show you how to setup a wonderful quiet fanless system.
I’ve bought a LEX NEO, a terribly nice Mini-ITX fanless barebone which includes an onboard bootable CF-card slot.
Thomas Bocek (nope.ch) helped me out with the following configuration.
The idea was:

  • The harddisk should only run when used
  • The whole system should be stored on a CF-card
  • We don’t want to stress our CF-card. Directories with a lot of access like /var/log should be run in RAM

We decided to install Debian Linux by USB-install, using a USB-stick instead of running some PXE network install which seems to be far more complicated.
Here’s a short HOWTO (for more detailed instructions, please check Debian USB memory stick booting:
Download boot.img.gz (7.9 MB). Also, download the official netinst image (108 MB). If you can’t find it, check http://www.debian.org/CD/netinst/ and download the stable i386 version.

Now, prepare the USB-stick:

Boot from your USB-stick and install Debian Linux on your CF-card. If it won’t recognize your CF-card, you might want to disable DMA («ide=nodma» as boot parameter). My CF-card, a SanDisk Ultra II 1GB, did not support DMA.

As soon as your system is set up, configure it to run directories with a lot of write-access completely in RAM.
Let’s create /sbin/preinit:

This will copy all data from /var/log_persistant to /var/log which is located in RAM as tmpfs on boot-up. Also, it sets the harddrive’s APM to extremely aggressive (-B0) and standby/spindown timeout to 1:30 minutes (-S18).
Make sure, this runs before the default init.d scripts. We managed this by specifying the init parameter in GRUB, /boot/grub/menu.lst:

Next, set up /etc/fstab:

/dev/hdc represents the CF-card on Secondary Master, /dev/hdd is the harddisk on Secondary Slave.

As you see, we’re now running the following directories in RAM:
/var/log, /var/run, /var/lock, /var/log, /tmp
All we need to do now, is synchronizing back the /var/log data to our CF-card every hour and on a shutdown

Create /etc/init.d/commit:

Add the commit script to all necessary runlevels:

That’s it! Enjoy your slick silent baby!

5 Responses

  1. Marc
    Jun 28, 2007 - 05:19 PM


    Note that with debian etch, you can install the flashybrid package which automatically does more or less the same thing.


  2. Henrique Brancher Gravina
    Jan 12, 2008 - 03:18 AM

    Nice! this instructions works very well to me. Ubuntu Server 7.10, Thanks.

    Only the chmod +x commands are not in the text.

  3. Thomas Verchow
    Feb 27, 2008 - 12:02 AM

    Add the mount option «noatime» to your grub/menu.lst to avoid updating the access time. This is something you really want to do 🙂


  4. Ppaul
    Dez 17, 2008 - 10:38 PM

    I am trying to install Monowall or Pfsense firewall on a Lex Light PC but it does not have CF card, I have only one 20GB HDD.

    How can I do it? Because the disk is on Secondary Mater.


  1. My Home NAS, Part 4 « In Defiance of Titles

Leave a Comment