How I spent my weekend

Some background: A couple of years ago I set up a Fedora Core-based linux box. I used it for Java development primarily. In the spring of '05 I upgraded it from an AMD Duron 1200 to an AMD Sempron 2400+. In October '05 I set up Cyrus IMAP and Spamassassin on it. I fetchmail'd my POP mailbox into Spamassassin which delivered non-spam to Cyrus, where it could be filtered into mailboxes on the server using Cyrus' Sieve implementation.

And it was good.

Until, a little over a week ago, when I got home, tried to check my mail and found the server was not responding. It was locked up, hard. Rebooted it. (bye bye uptime) All was well until last Thursday, same thing. Then, later that day, same thing again.

By Friday, the machine was a total loss. Won't reliably boot. Okay, I'll skip some of the details about the death of that machine, it's a mess.

Saturday I bought a new machine, at Mother Computers. Excellent store, I recommend them for your PC needs for sure.

I wasn't looking forward to buying a computer. I didn't want to, not only because I don't generally like PCs or like spending money on them (they take money away from my next Mac upgrade afterall!), but because I had only upgraded a year ago and it shouldn't have died. I went into the store thinking I would get a minimal system, hardware-wise, but I talked myself out of it while in the store. They didn't try to upsell me, I upsold myself.

I left with an Intel Core 2 Duo 1.86GHz system with 1GB Kingston RAM and 2 Seagate 250GB SATA2 drives. New case with a very nice 400W power supply, not the crappy one that usually comes with cases.

They built it for me right after I ordered it, had it ready in an hour. During that hour I was googling the name of the motherboard (Gigabyte GA-965P-S3) to see if there were any issues with it with Ubuntu, because I planned on putting the latest release on it.

Sure enough, there are issues with the new P965 chipset. It doesn't have PATA/IDE built in, so the motherboards have an external IDE chipset. Ubuntu doesn't yet recognize this chipset, so it can see SATA devices, but not PATA/IDE devices like a CD/DVD-ROM drive, which of course would hold the Ubuntu install disc. Lovely.

Thankfully I have an external Firewire/USB 2.0 DVD burner, and since it plugs in via USB, it's fine. Unfortunately Ubuntu wasn't recognizing it's onboard-gigabit-ethernet either, so Mother thew an old 3Com PCI NIC into the box at no extra charge for me (they had a bunch of them lying around). Thanks! By the way, I tested the USB-CD-drive theory in the store before I left with the box, to make sure I'd be able to install. If not, I was going to get an AMD Athlon 64 dual-core box instead. That wasn't necessary, as it turned out.

Since the Core 2 Duo is a 64-bit chip and it implement's AMD's 64-bit instruction set, I was able to install the amd64 version of Ubuntu 6.06.1. I set up the two SATA2 drives in a software RAID (I used the alternate install CD instead of the desktop install CD to get that option during installation).

I don't know if I made a mistake with telling the installer what I wanted booted or if it has a bug, but it chose the wrong partition to boot from in the GRUB configuration file, so it took me a while to figure out what was wrong and get that fixed. Once I had Ubuntu booted, I was immediately impressed, blown away really. It's really, really nice.

Before I could rebuild my system I needed my old data off the old 40GB IDE drive. Of course, Ubuntu isn't going to recognize that old drive because it's not SATA, so I had to put it into a USB 2.0 enclosure. And of course, it was using the ultra-weird LVM volume/partition scheme so when Ubuntu mounted the drive I only had the /boot directory and not the actual filesystem I wanted. After yet more research I figured out how to activate the volume group on that external disk and mount (read-only) the old filesystem.

Then I rsync'd it into a directory on my new drive. That took a while. :-) That ended Saturday's fun, at around 2am (Sunday morning).

Sunday I got up and had an hour to start looking at next steps before we had to go to Xavier's hockey practice. Xavier scored his first ever goal during practice! He was skating so much better than ever before, he really wants to improve. Good for him!

When I got back past 3pm, I started on the setup. First I had to get Cyrus and Postfix and Spamassassin installed. That was the easy part thanks to the package manager. Then I had to merge in configuration differences from the old machine and copy across my IMAP database/account data into the new installation.

But then I realized that the system clock on this machine was out of whack. Actually, it was running way too fast. This too seems to be a common issue with 64-bit machines. Argh. I hate PCs, and Linux is making a run for 2nd on my shit list. Can't keep time. Argh. Another hour wasted fixing that problem, I had to pass some kernel arguments in via GRUB to disable APIC. Joy.

But that's not all. I had to figure out how to configure Postfix (I used Sendmail on the old system) and get it to call Spamassassin to in turn deliver to Cyrus over LMTP. Oh, and getting Cyrus actually running was a joy too, the package manager didn't install enough of the packages it needed for SASL-based authentication and even once I did install enough I had to manually edit a bunch of config files and run commands to set things up. I was on my own figuring this stuff out, there was little or no guidance except for smart questions asked of Google.

Oh, and when spamcheck.py was running, I was getting an error from spamassassin about Sys/Hostname/Long.pm not being found. I had to install that via CPAN, but I didn't even have make installed (!) so I had to install that, but CPAN was still failing to install the package so I did it the manually way (perl Makefile.PL; make; make install) from CPAN's build directory. Nothing like a smooth situation to get one relaxed.

Finally, at around 11pm Sunday night, I got the damn thing working. Fetchmail is sending to Postfix which is using spamcheck.py as it's transport, which calls spamd and then has it forward the results to Cyrus over LMTP, where Cyrus can hand off to Sieve for further filtering / sorting.

Does it sound like I enjoyed myself? Grrr.

That said, Ubuntu is really, really nice, I like it much better than Fedora.

I didn't manage to study one damn bit this weekend. Now I'm behind. At least I have working email again.

Grrr.

Written on September 18, 2006