Project: gigaQube
shon.org
projects
blog
pics
 

Project Summary
Project gigaQube - by Shon Burton

Objective:
Transform a relatively useless Cobalt Qube into a small, quiet, and cool looking Unix server with gobs and gobs of storage.

Original Qube Specs:
Storage..............10 Gigabytes
RAM...................16 Megabytes
OS.....................Ancient version of Linux
Usefulness..........Zilch (for my purposes)

gigaQube Specs:
Storage..............240 Gigabytes
RAM...................128 Megabytes
OS.....................NetBSD 1.6.1
Usefulness..........Wicked (handles all my home storage needs, plus it's now a very useful little Unix box)

Project Status: Complete (with ongoing revisions)

 
 
Select Section:
 
Project Update: 10-24-03


Check out the recent updates:

Project Brief


I wanted to build a storage solution for my live/work space. At the time, I had over 80 Gigs of MP3's and an ever growing need for video, software, and document storage. This thing was going to live in my bedroom, so I wanted something small, quiet, and as cool looking as possible. Also, I had just won a 120 Gig drive from my buddy on a bet about eating hot sauce.

Enter the Cobalt Qube. I've loved these machines ever since I first saw one at Networld many years ago. You just can't get much smaller, or more cool looking than a Cobalt Qube. The problem with the Qube in my opinion is that from the factory, they are so underpowered that they really aren't good for much of anything. I bought two Qubes back in 2000 to be used for development at Dataverse Inc. We were developing a custom DNS management system for a new registrar that later got eaten by the dreaded Verisign. Shortly after receiving and playing with the Qubes, I named them Pamela.Anderson & Keanu.Reeves because they looked pretty... but they were stupid, and not much good to us. Now before all the Qube fans freak out... let me just say that I think this is a great little machine, but the amount of RAM, HD and the antiquated OS that they ship with basically makes a potentially cool little server, into a total gimp. The good news is that with a few modifications you can change all that. A crapper little "server appliance" transforms into a Unix server with 240 Gigs of storage in a package that's not much bigger than a spindle of CD's.

 

HowTo Build Your Own gigaQube

First get your drives. I would recommend 5400 RPM drives as they normally produce less heat, consume less power, and are less noisy than 7200's. I went with drives from two different manufactures. The first (boot drive) is a Maxtor R120L4. The second is a Samsung SV1204H. Both of these drives are almost silent. I won the Maxtor in a bet... I bought the Samsung from Eric, on his recommendation. After using both, I would recommend using 2 Samsungs. The SV1204H is almost dead silent, and runs slightly cooler than the Maxtor. According to the NetBSD/Cobalt guys, heat really isn't a major issue for the Qube. Some people say they've been told by Cobalt engineers that they "Should disconnect the fan" if they think it's too noisy. On the other hand, stock Qubes don't run two huge 120 Gig drives.

The major concern with this upgrade is the power supply. The Qube has a relatively weak power supply. I believe that some Qubes may not be able to handle two drives, and I know that there are different PS parts that were used in some Qubes. In fact, Cobalt sent me a new PS early on in the life of my Qube. This was well before I had ever popped the screws on the thing. Apparently they have a known problem with some parts, where the PS just fails over time even on a bone stock machine. Since Cobalt replaced the part I've had no problems, even with the 2 drives.

Next you'll need more RAM. My Qube came with 16 Megs, which isn't enough to play text mode Tic-Tac-Toe, much less do anything useful at any reasonable speed. I went with a 128 Meg SIMM from Crucial. The SIMM cost me $59 bucks.. which is expensive in terms of normal PC RAM but if you're going to have 240 Gigs of HD space, then you're going to need the extra RAM for file cache. Especially if you want to use Samba to connect your Windoze machines, it's well worth it.

Other Supplies you'll need:

  • Two 14" Ty-Wraps
  • An IDE extender cable
  • A female to female Molex power cable
  • A piece of a bubble wrap envelope for insulation
  • Double stick tape

 

Disassembly:

Now all you have to do it put it all together. Simple, right? Yup.

I'm not going to go into detail on the disassembly of the Qube as it's self-explanatory. Just grab your screw driver and take it apart. Once you're inside, you'll need to remove the stock cobalt drive to make room for your new 120 Gig boot drive. Again, this is very simple so I'm not going to go into detail... 4 screws, left side.. done.


Qube guts. Boot drive has been removed.
CPU board laying on table...
(128M SIMM installed)

 

Assembly:

Just replace the stock Cobalt drive the one of your new 120's. Simple, 4 screws...


Here we are with a clear shot of the new boot drive.
The CPU board was removed just to make it easier.

A word about RAM. I've read reports on the NetBSD/Cobalt mailing list that some people had strange problems and instability using 2 SIMM's. One guy figured out that the problems had to do with the order of the SIMM's relative to their size (big one in slot 0, small one in slot 1, etc..) However, I elected simply to remove the stock 16MB SIMM and save myself the hassle. I also didn't feel like the 16 megs was worth the additional voltage to run the second socket as I'm a bit paranoid about unecessary strain on the tiny Qube power supply.

Adding the second drive:

Quick overview: Mount 2nd drive to back of CPU board using 2 Ty-Wraps. Now the details...

Because you are mounting the drive onto the back of the CPU board, you MUST insulate the two components. Meaning that if the metal drive casing is in direct contact with the CPU board.. you may start to smell something funny... as in Qube flambé. To provide insulation, I used a standard bubble wrap envelop and cut out a drive-sized piece which is affixed to the drive with double sided tape. You should be able to get this any stationary store, office supply, etc. It seems to do an adequate job keeping the qube from catching fire.


A lowly envelope... the fine line between life and death for the Qube.
Click to enlarge

The Qube has 2 PCI slots, one is used by the CPU board, one is empty. We're going to use the space left by the empty PCI slot to house our 2nd drive. We're going to do here is mount the 2nd drive to the CPU board using 2 Ty-wraps.


2nd Drive mounted to CPU board. Notice yellow insulation under drive.
Click to enlarge


View from the top. Notice orientation of drive, power on top.
Also, notice placement of Ty-wraps. These should be nice and tight

A few things to watch out for here. This is a fairly tight fit, you must remove the PCI dust cover before installing the drive. The IDE cable from the drive will protrude slightly out of the PCI slot, make just enough room for a nearly perfect fit. Removing the dust cover will also benefit cooling by allowing additional airflow.


Notice the IDE cable poking out through the PCI slot
Click to enlarge

That's about all there is to it for the hardware part. You should be able to get a very good fit on the 2nd drive. And with the Ty-wraps cinched down, it's not going anywhere. I'm more than comfortable taking my Qube on road tips to friends houses to swap data at 100Mbps. Another big benefit of having a small high density server ;)

The Software; Loading NetBSD:

The one thing that makes this all worth doing is the Cobalt port of NetBSD. NetBSD/Cobalt provides the Qube with a modern OS that can recognize and utilize all of the new space you just strapped into it. The Qube had an interesting fate with Linux. The Qube uses a variation on the Mips R5000 series CPU made by Quantum Effect Devices, the QM5231. Cobalt ported an ancient Linux kernel (2.0 something?) to the QM5231 and shipped it on the Qube. The problem was that the kernel that Cobalt used was old (even for the time) and sluggish, and didn't support large drives, and was notoriously insecure in it's factory configuration. I didn't spend much time with it, but the few moments I did were ugly. This problem was compounded by the fact that the Linux community seemed to consider the Cobalt port good 'nuf so nobody ever made a more modern Linux port. Today Cobalt has moved on to the Qube 3 which uses an AMD K6-something.. in any case it's uses the X86 instruction set, making the early generation Qube incompatible (can you say orphan?) and unable to benefit from newer versions of Cobalt Linux.

Enter NetBSD. For those unfamiliar with the NetBSD project, it's a gem. One of it's best features is that it runs on everything but a John Deere (give them time) including the Sega Dreamcast, Plastation 2, Amiga, Atari, and some even more exotic hardware that I'm unfamiliar with. It also provides a very nice little free (as in your mind) BSD OS for practically every Unixish box around. Including of course, our beloved Qube!

Now this part used to be pretty tricky, requiring that you netboot the Qube and feed it a kernel and root device served up on an NFS share. Also, the Qube is hardcoded to boot from a gzipped kernel on a Linux partition, so the NetBSD kernel had to be compressed and placed in the correct location of the Linux boot partition.

I spent a few days getting NetBSD loaded onto my Qube, and I was going to write a comprehensive guide on how to do it. But before I got around to it, Dennis Chernoivanov made a "Restore CD" that pretty much does the whole install for you. It works on the same idea as the factory Cobalt restore CD. Basically, you put the restore CD in a PC that is connected to the Qube via ethernet, and boot the PC from the CD. You then fire up the Qube and netboot it, and *poof* some time later, you have a Qube running NetBSD! I haven't actually tried this method, but I hear it works quite well.

It seems that the new restore CD should resolve the need for comprehensive instructions on how to load NetBSD on the Qube the *hard* way. If you think this would be useful, email me. I'll write one if there's still a need.

Check out the NetBSD/Cobalt FAQ and the Mailing List Archive. There's plenty of info there to show you how to get NetBSD installed on your Qube the hard way ;)

Big thanks goes out to the NetBSD Project and the Cobalt porters in particular! Also, Thanks to all the good folks on the mailing list.

-Shon

 

Qube Power Supply Replacement (cheap)


As stated earlier I suspected problems with the factory power supply. Especially after adding the 2nd drive. Mine lasted about 4 months and then cooked itself on a particularly hot summer day. I think the 2nd drive was drawing a bit too much current for the old part. What sucks about this is that a new qube power supply will run between $40-$100 depending on where you go. Which sucks because you can buy a whole other Qube for not much more. What sucked more was that the GigaQube was so useful that I had loaded it up with over 200 gigs of important data before it died. The good news is that I found a super-solid and CHEAP replacement that works perfectly. I looked all over to find a compatible supply. I looked at new parts, old parts, replacement parts, variable supplies, etc. They are all expensive. Plus I didn't want to buy an exact replacement as it too would be destined to failure without serious (think Heat Sinks) modification. I wanted the same voltage, slightly more amps, in a similar form factor.. for under $10 bucks. Impossible you say??? Nay!!! Enter the HP F1044B. The F1044B is a power supply for older HP Omnibook models. It runs out at 12 Volts, 3.3 Amps and I bought mine on ebay for $6 dollars including shipping.

I've been up and running for a few months on the new part with no problems. It runs waaaay cooler and is similar in size to the factory unit. The only thing you need to do is cut the plug off the old PS, and graft it on to the new. Here's the blow by blow:

First you'll need to cut the ends off of both adapters.Be careful not to cut too close to the plugs, as you'll need some wire to work with. I was sniping away and almost cut the qube plug too short.

 
Here you can see the severed Qube plug being wired up to the new PS.

Cut and paste. The HP part has two wires separated by a layer of insulation on the center wire. The Qube plug has two separate wires (red and black). Cut the plugs, strip the wires and solder the black qube wire to the white (center) wire on the HP side. Then solder the red qube wire to the black (outer) wire on the HP. I then used electrical tape to insulate the two wires and to tape up the cord. If you want to get fancy get yourself some heat-shink tubing.

 

Once you have the Qube plug on the F1044B you're good to go.

*Remember kids, this is all very simple but you are working with electricity here so if you cross up the wires and cook your qube it's not my problem. Also, these instructions are based on the wire colors, voltage and amperage specs in my parts. Your parts *should* be the same but then again, who knows? Case in point: use your brain. If the wire colors are different, grab a multimeter. If the directions aren't clear, then use extra caution and proceed at your own risk.

 

gigaQube Performance Data


When I was first starting this project I had questions regarding the performance I could expect from the Qube in every day "life". After all it is several years old and it's little Mips CPU is less powerful than a modern PDA. Not to mention the multi-gigahertz machines that any fool can buy from WAL-MART these days. So the question of "how useful is this thing really going to be?" is a valid one.


This is output from systat. here you see the 2 disks at work along
with the total system load. Wd0 is transferring a file via Samba.

The answer is pretty simple. It's very very useful. In fact, It is now one of the most useful machines I own. It can push out around 25-30 Megabits Per Second continuously. In practical terms, this means that you can stream mp3's or Divx movies, install software from the Qube or even run software that resides on the Qube over the network. I regularly do all of these activities, and often all at once. In addition to serving as my local file server, my Qube is also serving a fairly busy website, an ftp server, mail server, and IDS. Next it will assume duty as my firewall and packet shaper (as soon as I get ALTQ running). In addition to all of that, I regularly use it to run several unix apps plus the odd utility script that I write when the mood strikes me.

Since I've started to keep mine pretty busy, I setup MRTG on the gigaQube to monitor it's performance. Click the image below to check out what the gigaQube is doing right now:


Click for real-time Qube performance stats

 

Additional Qube Resources

NetBSD/Cobalt page - Great resource for Qube info
Official Cobalt Users Group
- This is the japan based CUG.
Qube Corner FAQ - The Qube Corner has an excellent FAQ