Friday, December 17, 2004

From Linux to FreeBSD

Goodbye, Linux. Hello, FreeBSD.

About five years ago, when I was building out my home mailserver, I considered a couple of OS platforms. Windows 2000 was right out for resource reasons (the machine was a 90 MHz Pentium). I looked at the Debian, RedHat, and Mandrake distributions of Linux, as well as FreeBSD. Installing FreeBSD yielded a thoroughly broken system--probably my own mistake, but given the short amount of time I had to evaluate operating systems, I ended up settling on Mandrake.

Today I have a cheap, two-year-old laptop that dual-boots Windows XP and Fedora Core. But on this machine, Fedora Core has let me down more with every release:

Fedora Core 1
: It worked pretty well, but not completely. The ACPI support didn't like my laptop's broken ACPI implementation. In fact, the only part of it that worked was the power button (no case lid switch, battery status, fan status, or suspend functionality). To quote the Linux ACPI implementors: "We refuse to be bug-for-bug compatible with the other major implementation [Windows]." In other words, "pound sand, chump; buy a real machine". Well, gee, thanks, guys. I mentally thanked them again every time my laptop suddenly shut down because the battery had run down to nothing. On the other hand, Yum was great, almost as good as Debian's apt-get (although when I installed it on an older machine, it was close to unuseable, so I switched that one to using apt-get).

Fedora Core 2: ACPI still broken, and now the touchpad stopped working. I did the right thing and filed a bug against it with as much info as I would gather. Turns out there was a kernel change that broke the touchpad driver, and no one seemed terribly interested in fixing it. Eventually I found and compiled a third-party driver, which worked around the problem. They also moved the mount point for cd-rom drives, which broken a number of my backup scripts. Yum didn't work out of the box because of the heavy load on the default servers, but a quick Google found some mirrors that fixed that.

Fedora Core 3
: ACPI still broken, touchpad still broken, and now SE Linux doesn't like mod_python. OK, turn off SE Linux. They also moved the mount point for cd-rom drives... again. Re-fix the scripts. It doesn't show the boot menu by default ("why would you want to boot anything else?"), so you have to be quick if you want to dual-boot, or else tweak the boot prompt. The second time I ran yum to apply updates, it broke itself... irrevocably. OK, reinstall, re-fix touchpad, re-fix mod_python, re-fix scripts, re-fix boot prompt... why did I upgrade again?

Actually, I didn't intend to install FC3; last year I got back into Debian for work-related projects (after a several-year hiatus). This summer I had resolved to install Debian when Sarge was released in late September October November December next year.

This week the token OS/X geek at work was going on about the *BSD systems, and recommended NetBSD for my laptop. I dug around a bit, downloaded both NetBSD and FreeBSD, and decided to give FreeBSD a whirl.

It just works.

Right out of the box, ACPI works, the touchpad works, the X Windows system works, and the CD burner works--all without lifting a finger to configure them. I only found two minor problems so far: the sound driver wasn't loaded by default, and ACPI's level S3 suspend-to-RAM doesn't bring the display back. But unlike that of Linux, FreeBSD's ACPI documentation goes into great detail on how to diagnose the problem, how to report the problem, and even how to attempt to write the needed patch yourself.

I've been tinkering with Linux kernels for many years, and I'm right at home customizing them, but from the few hours I've played with FreeBSD, the kernel compilation and install process is cleaner and simpler, and more understandable when it goes wrong. The FreeBSD documentation is also much more consistent than that of Fedora Core.

So what are the downsides? Not many, so far. I was expecting a little more software on an initial full install (there's only one installation CD), the ports and packages seem to lag further behind the upstream revisions than they do in Fedora Core, and starting large apps like mozilla or emacs seems to take longer than on FC3 (possibly related to FC3's prelinking feature). But I can deal with those.

I'm going to be decommissioning that old "Little Pentium-90 That Could" mailserver later this winter. And it looks like the replacement will be running FreeBSD.

[Update: mea culpa. The long load times for mozilla and emacs were caused by misconfigured DNS--I installed while off the network. After I got the network settings squared away, I don't see a visible difference in startup speed.]

3 comments:

Anonymous said...

Before deciding you might want to try Ubuntu. It seems to be everything that red hat used to be and since you used debian before you should find it comfortable since it is a debian derived distribution. Worth a look, and pretty up to date.

Tim Lesher said...

Funny you should mention that.

I tried the first release of Ubuntu. The Live CD died on startup (unable to load session); the install CD worked fine.

Now--release 5.04. Live CD still dies in the same way, but the install CD consistently hangs when trying to set up the apt repository. /var/log/* are no help; they just trail off.

After five attempted installs, I've noticed that Sarge is frozen, so I'm trying that.

If Sarge pukes, it's back to FreeBSD for a while.

Unknown said...

Hmmmm, is it better than red hat linux tho... really?

Mike