Category Archives: Projects

Budget mini-ITX home server build

Atom

For the past three years, I have been using a Linkstation Live for my home server.  When I bought it, it seemed ideally suited to my needs – it’s small, consumes under 30W full-load, and can be hacked to run Linux (I was running Debian).  It’s primary purpose is to serve files (functioning as a NAS device, as Buffalo intended), but I also use it for some more interesting things, such as hosting a subversion repository, serving music with mt-daapd, and managing a small VPN.

I started outgrowing the ARM9-based Linkstation at least a year ago – it was bogging down under the load of the many services it was running.  However, earlier this year Debian Etch became unsupported, meaning that I was no longer receiving security updates – a potentially major problem for a server that has a few ports open to the ‘net.

I started thinking about building a replacement using more modern, faster parts, but still keeping the server’s footprint small – both in terms of space and energy consumption.

After doing some research, I discovered the mini-ITX standard for motherboards and the Intel Atom D510 dual-core processor.  When combined with the right case, these would yield the perfect home-server for my needs.

Here’s my build list.  All parts are from Newegg.com:

Foxconn RS233 Black+Light Silver Computer Case – $44.99 (includes 150W PSU)

Intel BOXD510MO Intel Atom D510 Mini ITX Motherboard/CPU Combo
– $79.99

PQI POWER Series 2GB 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400) Desktop Memory
– $38.99

HITACHI Deskstar HD31000 1TB 7200 RPM SATA 3.0Gb/s 3.5″ Internal Hard Drive – $64.99 (no longer listed @ Newegg)

SAMSUNG Spinpoint F3 1TB 3.5″ SATA 3.0Gb/s Internal Hard Drive -Bare Drive – $58.99 (a good substitute)

StarTech BRACKET Metal 3.5″ to 5.25″ Drive Adapter Bracket – $11.99
(For mounting a 2nd hard drive.)

Athena Power 10 ” Extension & Conversion Four-In-One9
– $6.99

Xion XON-DRBY525MB 5.25″ Driver Bay Cover Kit, Mesh, Black
– $9.99

Note: Prices listed are current as 9/17/10 and are subject to change.

The total for all parts at the time I bought them was  just under $250 (excluding shipping).  Not bad!  As of today (9/17/10), the prices have gone up slightly and the total is $257.93, although the Hitachi hard drive I bought has already been discontinued.   Newegg frequently has deals on 1TB 3.5″ drives, so finding another one in the $55-$65 range should be pretty easy if you look around.

Here are most of the parts waiting to be assembled:

New server parts

I spent a lot of time looking for a case, and I’m extremely happy with the Foxconn RS233 Mini ITX case I found.

Foxconn RS233 Mini ITX case

Everything fit very nice inside, including a 2nd 3.5″ hard drive I had lying around that is used for backups.  (The 2nd hard drive is installed in the 5.25″ bay, using adapter brackets.)

I added a short power supply extension cable to the motherboard power connector.  This is because the 150W PSU that comes with the Foxconn case has a short power cable that can’t reach the motherboard power connector without stretching.  It can be forced to fit, but the extension was inexpensive and gives me some peace of mind.

New power cable routing

I initially had some problems with hard drive temperatures, but installing this clean-looking grill in place of the 5.25″ bay cover solved that.  For testing, I just left the cover off the bay completely, which provides great ventilation but allows cat hair to rapidly collect inside the case.

Grill installed

I also covered the case’s top vent to keep the exhaust fans from sucking air through there instead of through the front of the case (past the hard drives and CPU).

Top vent sealed

Here is the finished server.  It’s small!

Finished

I spent a couple evenings installing and configuring Ubuntu Server 10.04 LTS, which I am very happy with so far.  It did force me to learn how to completely install and configure Ubuntu via the command-line (Server doesn’t install a GUI), but it was all stuff I mostly knew already, and I probably gained some geek-cred.  😉

While I still have a few things left to set up (OpenVPN takes a bit of configuring), I’m very happy with the performance of this box.  While a dual core Atom is nothing compared to a typical desktop machine today, this machine is lightning-fast compared to the 200MHz ARM9 it replaced.  For a small home server, this is a perfect solution.

Power consumption is about 35W with both drives spinning, about 30W idle.  Just a few watts more than the Linkstation, for a system with >1.5GB more memory and what feels like 10x the processing power!

Fixed USBTinyISP drivers for 64-bit Windows 7 / Vista x64

For some time now, those wanting to use the Adafruit Industries USBTinyISP with the 64-bit versions of Windows 7 or Vista were faced with the following errors when attempting to install the device drivers supplied by Adafruit:

For some reason, the 32-bit versions of these operating systems don’t prevent the unsigned drivers from being installed, although they do complain.

There are a few workarounds that involve hacking Windows or disabling digital signature checking, but thanks to a tip by user wayneft on the Adafruit support forums, I was able to make the process much more straightforward.

The USBTiny drivers are based on libusb-win32.  Based on some notes I found on the libusb-win32 wiki, I discovered that the latest libusb drivers contain a proper digital signature:

Vista/7 64 bit are supported from version 1.2.0.0 since a Microsoft KMCS accepted digital signature is embedded in the kernel driver libusb0.sys. libusb-win32 based device drivers can also be submitted for Microsoft WHQL testing. Several companies have successfully finished the WHQL testing with their libusb-win32 based driver package. This will allow the customers to install the driver without a warning under current 32bit/64bit Windows.

This is good news!

I downloaded the latest version of libusb-win32 (1.2.1.0) and used the included inf-wizard tool to create new drivers for the USBTinyISP:

usbtinyisp_libusb-win32_1.2.1.0

I used the Windows device manager to upgrade the broken drivers on my Windows 7 64-bit machine.  There is still a warning that “Windows can’t verify the publisher of this driver software” but there are no more errors about digital signatures and the new drivers appear to install and work correctly.

I haven’t done a huge amount of testing with the drivers, but I was able to communicate with the USBTiny via avrdude and flash a simple program to an AVR.   I also haven’t tested this fix on Vista, as I don’t have access to a computer running it.  If anyone tests these drivers on Vista x64, please post your results in the comments!

Measuring network performance with iperf

My new place in Austin came with a huge perk for a tech geek like me – it came pre-wired for ethernet in every room.  (Well, technically not every room is wired.  The laundry room, bathrooms, and garage are not, an understandable oversight.)

After installing a new D-Link Gigabit Ethernet Switch, I wanted to check the throughput to see if I was actually getting gigabit speeds – particularly because the house is wired with CAT-5e cable (and not the recommended CAT-6).

There are many ways to measure network throughput.  In the past I have usually copied a file across the network and used a stopwatch to get a relative sense of speed.  However, due to file sharing protocol overhead I always got disappointing results and never knew maximum capability of my network.

This time, based on the advice of a more network-savvy friend, I decided to use a command-line tool called iperf.

iperf is a command-line tool to measure network performance.  It is very powerful, but also easy to use for simple tests.  For a more complete overview of what iperf is and what it can be used for, check out this tutorial or the iperf page on Wikipedia.  iperf has a lot of options, and I won’t cover the majority of them here.  For more usage information, consult the iperf manual.

If you run Debian or Ubuntu (Linux), iperf can be installed by executing

sudo apt-get install iperf

I did these tests with OS X on the Mac since both of my Macs have gigabit ethernet ports and my older PCs don’t.  A package for iperf is conveniently available from Macports.  It can be installed via the graphical package manager Porticus or opening a Terminal window and typing

sudo port install iperf

In my case, all I wanted was a quick test of TCP/IP network performance.  This is easy to do, but it requires two computers, a client and a server, both connected to the network under test.  Ideally, there should be no other network traffic during the test, as this will affect the results.

On the first computer, launch the iperf server by executing

iperf -s

You should see something like this:

------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------

On the 2nd computer (the client), open a Terminal window and run

iperf -c <IP address or hostname of server> -i 1

Within a few seconds, you should start to see reports coming in on both the client and server terminal windows:

------------------------------------------------------------
Client connecting to mini.home, TCP port 5001
TCP window size:   129 KByte (default)
------------------------------------------------------------
[  3] local 192.168.24.135 port 65142 connected with 192.168.24.77 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec    110 MBytes    924 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  1.0- 2.0 sec    101 MBytes    850 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  2.0- 3.0 sec    109 MBytes    914 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  3.0- 4.0 sec    100 MBytes    841 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  4.0- 5.0 sec    111 MBytes    927 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  5.0- 6.0 sec    102 MBytes    853 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  6.0- 7.0 sec    110 MBytes    923 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  7.0- 8.0 sec    102 MBytes    858 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  8.0- 9.0 sec  79.4 MBytes    666 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  9.0-10.0 sec  93.6 MBytes    785 Mbits/sec
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1018 MBytes    854 Mbits/sec

The last report (for the interval 0.0-10.0 sec) is the average throughput for the entire test.  I’m more than happy with 854 Mbits (927 Mbits/sec peak!) given my fairly long runs of CAT-5e cable and other machines using the network.   Contrast this with my results over 802.11g wireless:

[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  24.9 MBytes  20.9 Mbits/sec
Ouch.

The Tech Junkies Build a Wifi Radio (Video)

In this episode of The Tech Junkies, Ben and Eric show how to hack an Asus WL-520gu wireless router into a music playback device. By loading the OpenWRT firmware onto the router and adding a USB sound card, it is possible to convert this cheap/powerful router into a streaming box to be placed anywhere your WiFi is in range. Now you can build your own shoutcast/icecast receiver for cheap and get music wirelessly to any room in your home.

Pretty cool video based on my original Wifi Radio tutorial.

To leave comments or download the video, visit The Tech Junkies Episode #6.