Soekris Basics
What do you call a 486 with 64MB of RAM that’s roughly the size of a small book ? A Soekris 4501. These units are equipped with 3 ethernet ports, a mini PCI slot, a full size PCI slot, a Compact Flash slot and 2 serial ports. The second serial port would need to be wired up manually.
It’s been interesting figuring out the best way to configure this. The simplest route is to just treat the CF card as a HDD. This works well with a couple of exceptions:- Powering the machine off without properly shutting it down can lead to a dirty disk, which could mean that you’d need to intervene with a console the next time it starts up.
- I haven’t read anything conclusive, but it’s been said that continuous use of a CF card will drastically shorten its life.
- Not fast.
The other method is to have the system boot into a ram disk. There are actually 2 ram disks that are created. One is part of the kernel and we would equip it to have a basic set of tools to prepare the second ram disk. The second ram disk is mounted at /usr – nothing too interesting there.
I’ve used FreeBSD for years, but this is the first time I’ve spend any serious amount of time using OpenBSD. I’m really impressed with OpenBSD. It’s so minimalistic, which makes it a perfect candidate for an embedded system, such as this.
The documentation here was very helpful and I’ll let it cover most of the details:
http://256.com/gray/docs/soekris_openbsd_diskless/
- Kernel is read in off the CF card and basic ram disk is created. At this point we are still independent of the CF card, but we can’t really do anything yet.
- The rc.diskless script creates the second ram disk (/usr), mounts the CF card and copies /mnt/usr off the CF into /usr (on the ram disk).
- Unmounts the CF card.
This means that if I were to unplug the soekris, unless it’s booting up, it will never be a dirty disk.
I used OpenBSD 4 (vs 3.x), so I had to do some minor adaptations. I also really sped up the development process by using a couple of VMs to be the host/build OpenBSD system and one to be the ‘soekris’.