After several months I finally got around to the soekris I bought back in February. It is now taking care of all my mail reading needs and seems to run stable and reliable.
The operating system is of course FreeBSD like
most of my other machines. However this one is different. All the software that runs on
it is built on my workstation by a script that generates two images. The first image
contains the root filesystem and the second one contains /usr/local
and
/usr/X11R6
. The reason for this split is that the soekris only has 64MB
of onboard flash.
When the system is up and running the df -h
output looks like this:
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 59M 48M 6.6M 88% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/ggate0 1.9G 826M 994M 45% /home
/dev/ggate1p1 185M 158M 12M 93% /usr/local
/dev/ggate1p2 63M 59M -1.7M 103% /usr/X11R6
/dev/md0 31M 660K 28M 2% /var
/dev/md1 19M 12K 18M 0% /tmp
As you can see I use ggate for accessing the image that contains /usr/local
and /usr/X11R6
as
well as the file that contains /home
. Both are stored on my other soekris that has a harddisk.
The image building is done by a 400 line perl script that uses a configuration file to determine how the images
should be built. The build.cfg
for dominion.borderworlds.dk
is here. Most of it doesn't need much explaining. If you know a little about the FreeBSD build process you will
recognize the buildflags as options you normally set in /etc/make.conf
. Portsflags does the same thing -
just for the ports instead of the base system.
The imageloader flag indicates whether the special component called imageloader should be included in the image.
The imageloader is a small mfsroot
image that can be booted as the root file system and then be used
to load a new image onto the flash. If enabled the forth code in /boot
is modified to include a custom
command "update" that loads this mfsroot
image and boots with it as the root filesystem.
I might release the build script at some point but right now some parts of it are just too ugly and too many things are har coded. It will probably become better when I build a few more systems with it and force myself to make things more generic.
Finally a picture of my infrastructure closet: