I was recently “voluntold” to clean up several years’ worth of accumulated computer parts in my GeekCorner of the basement. I was generally fine with this, since even I had to admit that things had gotten a little out of hand over time. The cleanup took a lot longer than I expected, but the resulting local decrease in entropy down there is definitely an improvement. And since most of the bits and pieces were intended for use in various long-neglected projects, getting rid of that stuff meant I could stop feeling guilty about never getting around to starting, let alone finishing, those projects. Like Paul Graham says, your property really does own you.
One item I did save from the get-this-out-of-my-house boxes was an Epia M10000 motherboard. VIA was the pioneer in developing the mini-ITX form factor, and their boards have been extremely popular over the years with those interested in creating small form factor computers. The Epias are noted for their low power consumption and ability to be passively cooled; consequently they make great silent PCs. I had used the Epia M10000 for a while in a previous project, but it was now idle and ripe for re-use. I’d been meaning to put together a low-power network file server, and this seemed like a good time to finally make that happen.
In reality, “building” a computer is really not much harder than putting together Lego bricks. All that’s required is a motherboard, CPU, RAM, a case, and power supply. In the case of the M10000, the CPU is soldered to the motherboard already, so that’s taken care of. Plugging in RAM is trivially simple, so all that’s left is to take care of the power supply and case. For my project, I chose a case and power supply that are popular with the car-PC community (yes, there are people that build computers specifically for their automobiles).
The power supply I settled on is a Pico-PSU. This tiny power adapter is designed to run off a 12V input, which is easily supplied by an external power brick.
And as for the case, I picked an M350 mini-ITX enclosure. These all-metal cases are incredibly well made, and look better than any other PC case I’ve ever owned.
Of course, I still needed some kind of storage for the computer. The M350 includes a bracket for mounting a 2.5? hard drive, but I opted instead for a silent, solid-state solution in the form of a compact flash card and a CF-to-IDE adapter.
With all the pieces in hand, it was dead-simple to assemble the system.
My OS of choice is Linux, and for this small, headless system, Debian seemed ideal. Installation of Debian is generally smooth and simple, but I managed to complicate things by trying to install from a USB flashdrive. In theory, this should have been as easy as booting from a CD, but in practice, I ran into two issues, though they were both easy to overcome.
The first problem I encountered was that the Epia refused to boot from the flashdrive. I set the first boot option to “USB-ZIP” in the BIOS setup, but the board stubbornly refused to recognize the USB flashdrive during startup. Thankfully, a little Googling revealed that after switching to USB-ZIP, I still needed to physically remove power from the system and then insert the flashdrive. Strange, but once done, the drive was recognized as expected during boot.
The other problem I encountered was that the instructions for installing a Debian boot image on a USB device don’t seem to work for the flashdrive I was using. In my case, I had to do things in this order instead:
- Format the partition (# mkdosfs /dev/sdb1)
- Copy the install image to the partition (# zcat boot.img.gz > /dev/sdb1)
- Make the flashdrive bootable (# syslinux /dev/sdb1)
- Force all data to be written to the flashdrive (# sync)
- Unplug and replug the flashdrive
- Copy the Debian installation image to the drive (just drag/drop the debian-188.8.131.52-i386-netinst.iso file to the flashdrive)
All of the above was done from another Ubuntu system. If you’re running Windows or want to make life easier for yourself, I’d suggest just burning an installation CD and hooking up a drive to your target system.
So, after assembling the system, creating a bootable USB flashdrive, and coercing the Epia to boot from USB, I was soon up and running with Debian. Since the server would be running headless, I didn’t bother to install a graphical desktop environment; however, I did make sure to install Samba and sshd. Samba enables Windows-style file sharing with any other device on the network, and sshd allows me to connect to the server for command-line interaction.
Another small problem I encountered was in relation to Samba and a Windows client. I attempted to browse a network share I’d set up on the Debian system, but Windows stubbornly refused to allow me to see the share in the network browser. I eventually remembered that Windows uses the current logon credentials to connect to a network file server, and since I hadn’t set up a corresponding account on the Debian system, that silently failed. The obvious solution was to set up the account on the server, though it also works well to include the line, “map to guest = bad user”, in the smb.conf file (this essentially treats bad logons as guest users).
With the assembly and installation complete, the next step was to hook up the external USB hard drive I wanted to share with network. Rather than setting up USB auto-mounting, I just manually created a mountpoint and added it to /etc/fstab. I don’t plan to remove the drive often, if ever, so hard-mounting it seemed pretty reasonable. And with it mounted, it was simple to configure Samba to share the contents (Swat, the browser-based Samba configuration utility is very easy to use!).
I’m pleased with the end result, since it serves up my files to the entire network, and also gives me a generic Linux system to play with, too. Was this the easiest way to set up a network file share? Certainly not, given that there are inexpensive plug-and-play devices like the D-Link DNS-323 or the Zotac ZBOX PCs; however, I saved some money by re-using the Epia motherboard I already had, and ended up with a generic Linux system, too.
The only tweaks I’m still considering for the system are to remove the fan, and to replace the CF-IDE combo with a disk-on-module device. For the fan removal, I first need to monitor the CPU temperature with only a heatsink in-place. And for the disk-on-module, I just have to wait for my DealExtreme order to arrive.
Oh– and I do have one other very easy alternative for a network file share, but you’ll have to wait until I finish the Patriot Box Office review I’m working on. Stay tuned…