box.matto.nl

home/

My current Text Mode Shell Server

Last edited

Silent, efficient and green

Below follows a description of my current text mode shell server.

Motherboard: VIA EPIA ME6000 LVDS Mini-ITX

Unfortunately this motherboard is out of production. It is a great board to be used as a Linux server. The EPIA ME6000 is a fan-less motherboard, the 600 MHz CPU is soldered directly to the board (no ZIF-socket). It is small (only 17cm x 17cm) and disspates not much power.

More on the Epia mothterboard

1 Gb RAM memory

That is all the motherboard can take.

Three 8 Gb USB memory pens

USB memory pens have become real cheap. 8 Gb is obvious much more then needed. I bought a package of 4 8Gb memory pens at a real bargain price. This is how the memory pens are used:

  • Memory pen 1:
    Operating system (Debian GNU/Linux) and /home
  • Memory pen 2 and Memory pen 2
    set up as an RAID-1 device carrying my cvs repository

Ramdisks

When using a diskless system running from USB memory pens it is important not to use the USB pen for /var/log and stuff like that. USB Memory pens don't like many write-cycles. A couple of ramdisks are mounted at boot time in order to solve this.

I also use a ramdisk to do some work. This typically involves checking out a project from the CVS repository, do some work, commit the changes to the CVS repository, generate the new outcome of the project and scp the results to the server where it is needed. As an example: this website is maintained that way.

The following directories are set up as ramdisk:

  • /etc/network/run
  • /tmp
  • /var/lock
  • /var/log
  • /var/run
  • /var/tmp
  • /home/ramdisk

Operating system

For a very long time I have been using Slackware as a basis to build my personal shell server. At the last overhaul I deciced to switch to Debian. Debian comes with a giant repository of applications. I do like the simplicity of the Slackware-style a lot, but the convenience of apt-get install won me over. Maybe I am getting lazy :).

In order to install the system I used the debootstrap package. This created a very minimal Debian system which I transfered to the USB memory stick. Then I booted from the stick and apt-get installed the applications I intended to use. Still I end up with more stuff I wanted, that is the price one pays for using Debian I guess. Because the size of the memory pen (8 Gb) this is not much of a problem.

CVS repository

Knowing your data is save brings piece of mind

Using a personal CVS repository has saved my life several times. Once you start using CVS for your daily stuff, you tend to put more and more things in it.

Running a CVS helps you to keep your $HOME very clear. Doing work consists of checking out the project, do your stuff, commit the changes and after your done remove the project from your $HOME again.

On my diskless shell server I use /home/ramdisk for these actions. Off course this makes committing the changes even more important.

My repository is rsynced to another system every night. Backups are important!

GNU Screen

GNU Screen is the application that makes life in a shell server much easier. Or even possible. I log in on my system, do a screen -x and I am back in my working environment at exactly the place I left it. At the end of of the day, I detach from screen and log out.

Besides the possbility to log in and out as I please and everything still keeps running, the fact that I can have several terminals open in the ssh-session is also a very great part of Screen.

GNU Screen is the glue that pastes everything together.

Applications

I have the usual suspects installed, I guess. Here is a quick overview of the most important applications:

Desktop

It might be a little strange to talk about desktop applications on a text mode shellserver. For me, my daily work-environment is set up in the shell server and I practically live in it.

  • Mutt (for reading email over IMAP
  • ScrollZ (for wasting time on IRC)
  • Centerim (for wasting time on jabber, icq and more)
  • Newsbeuter (for wasting time on newsfeeds)
  • Elinks (for surfing the web)
  • bti (for an occasional posting on Identi.ca)

I recently changed from bitlbee to centerim.

Generate stuff

In order to generate all kinds of stuff I use:

  • awk
  • m4
  • sed
  • sort
  • uniq
  • make
  • sh

And sometimes I use perl as well :)

Completely silent and green

This setup of the diskless text mode shell server has proved itself over time. It is completely silent and the powerconsumption is very low.

The key that made this possible was the decision to move mail to an external imap-server. Before that the receiving of mail required a lot of space and a lot of write-cycles. I never dared to do that on USB memory pens. Also spam filtering required more and more CPU-power and became to much of a burden for the vIA 600 MHz processor. Moving the mail to an external party made the setup of a diskless shell server possible.