Reviving dead hardware: IBM Thinkpad 600

I had an old IBM Thinkpad that I bought used at a local computer show for Dena. A Pentium II 233Mhz with a 5G hard drive and 192M of PC100 RAM. Not exactly high end but hey, it’s a Thinkpad and it was fairly cheap.

After she got her Powerbook I installed Debian on it and used it as a backup laptop. A buddy of mine needed a machine for a while so I lent him the Thinkpad. I eventually got it back a year or so later but it wouldn’t boot. Instead it greeted me with the BIOS error code “161, 192, 163”, which is computer speak for “What the fuck, I can’t remember who or what I am.” I did a little googling and found that this Thinkpad uses a very standard battery for CMOS, the CR2025, which can be bought damn near anywhere. I picked one up at Radio Shack for under $3.50 with tax.

Inside the Thinkpad 600

Getting to the BIOS battery is painfully easy. Remove the cover housing the memory and pull the top piece of memory. You might be able to work around it but why bother. From there, you can disconnect the battery lead and pull it free. It’s just sitting there waiting for attention.

Liberating the CMOS battery

The guy at Radio Shack was in awe of the yellowness of the battery. Apparently he’s unfamiliar with modern marvels such as “shrink-wrapped plastic”. In any case, we’ll be cutting off the plastic coating shortly.

Assemble the new battery

Cut away the plastic coating. The negative and positive leads are stamped into the surface of the battery so you have to pry them off carefully. I used the flat blade of a screwdriver to work the lead away from the battery.

Putting it all together

Putting it back together is a bit of a cheap hack but it seems to work well enough. I cut small strips of electrical tape to secure the leads to the battery. I made sure to wrap the exposed leads to the wire so that there is no chance of them coming into contact with each other or anything else metallic in the case. Then I wrapped the entire thing for safe measure. Putting the battery back in place is easy, just reverse the process. Tighten it up and you’re ready to go.

If you have other queries about hardware and software, or if you want to find A good comparison of HDD vs. SSD, then proceed to the site of Backblaze and enligten yourself.

The first time you power it up you’ll get another BIOS error code, this one telling you that you need to set the date/time. It’s an ugly screen but it works.

This quick and simple hack has given this old Thinkpad a new life. Armed with a fresh install of Ubuntu and a wireless card, I’ll be rigging this up as a semi-permanent member of my wardriving setup.

Drivel 2.0 and Ubuntu

Bill talked about Drivel, a GNOME application for posting to your blog. I tried the current version in Ubuntu but was confused when it only appeared to support LiveJournal. I caught Bill on IRC and found out he had to built the latest version of source to get it to work with his blog.

Get your Drivel 2.0.1 .deb (tested for Breezy) here. The official version of the latest Drivel should hit Breezy at the next sync but this will work in the meantime. Note that Drivel doesn’t have an explicit option for WordPress. Just choose Moveable Type and point it to http://your.blog.com/xmlrpc.php

C# Gripe: enum base types

As a whole I love C# but sometimes I find some quirk that I just don’t understand. I’m sure there is a reasonable explanation of why it works the way it does but I don’t know what it is.

I was building a Gtk.TreeView last night and setup an enum for each column in the TreeView. No big deal, right? The enum looks something like this:


enum Fields
{
enum1 = 0,
enum2,
enum3
}

Then, to build the column I do something like this:

TreeViewColumn col = new TreeViewColumn ();
CellRenderer NameRenderer = new CellRendererText ();
col.PackStart (NameRenderer, true);
col.AddAttribute (NameRenderer, "text", (int)Fields.Keyword);

Notice on that last line that I have to cast the enum member to an int, even though the type of the enum is int, you still have to cast its value.

You can specify the base type of an enumerator, but it defaults to an int. You could do this (and I tried) but it doesn’t change anything:


enum Fields : int
{
enum1 = 0,
enum2,
enum3
}

It would be nice to not need to cast the value of the enum, especially given the ability to explicitly set the type of the enum. I don’t know the internals of how the compiler works nor have I read the CLR specification. It’s just annoying to to tell an enum that it’s an int, only have to remind it of that fact every time you use it.

MailScanner Bliss

Spam is a huge problem for everyone. Running a mail server these days is particularly painful. Spam, viruses, and phishing are enough to drive me insane. Our spamassassin + amavis solution worked well for a while but something changed recently that made it a total bitch to keep running. Amavis would just hang randomly and mail would just sit in the queue until I noticed it. I was complaining about it to Jorge and he mentioned that he migrated to MailScanner.

MailScanner does some rather nifty things like act as a gateway to all sorts of mail filtering, like spam, phishing, and viruses. It basically calls whatever application you want to use for filtering, but also does things like making sure the filters don’t hang or take too long. The configuration might take a while to get right but it’s easy to follow and well-documented. In the week or so since I installed it it’s run rock solid. The only problem I had was a misconfiguration, not enough child threads to do the work so it fell behind. It never just hung or stopped working, though.

One of these days I’ll get around to writing something about the entire mail setup we are using.

John Ratzenberger in Star Wars

We watched Empire Strikes Back tonight. While the end credits were rolling by we noticed a familiar name scroll by: John Ratzenberger (who reminds me of John Fleck for some strange reason) aka Cliff Clavin on Cheers. We were shocked that we’ve seen this movie literally hundreds of times and never noticed him.

I found a copy of the script. Here are his two lines:

DERLIN: Your Highness, there’s nothing more we can do tonight. The
shield doors must be closed.

He turns to the lieutenant.

DERLIN: Close the doors.

We had an “oh duh” moment as soon as I read that. Kinda cool.