OpenBSD sucks!

Last FOSDEM, I snatched one of the free OpenBSD 3.7 CD-ROMs with me. Not that I was planning to switch to OpenBSD or anything; but I have this spare 10G partition on my laptop that I use to play with all the time. There's never anything on that partition that is insanely important; and usually I change it to something else after a few months.

It had been containing MacOS for a fair number of months, since there was an issue with my kernel that made changing my screen brightness impossible for some reason; but that has been fixed now. I wouldn't know what the problem was, but switching from my own-built kernel.org kernels to the Debian-precompiled kernel fixed it. Heh.

As it happened, this weekend I was looking for something in my backpack, and stumbled upon that OpenBSD installation set again, which I'd completely forgotten about. Since I'd grown tired of MacOS by now, I thought about installing OpenBSD on the play partition.

Obviously, their installer is a slight bit more spartanic than the Debian installer. Heck, they're a BSD system.

One of the first questions was whether I wanted to use an OpenBSD-specific partition table or an HFS-based one. Since Linux uses the latter, and I didn't want to lose the Linux partition, I chose HFS. Next, it threw me into a partitioner, telling me that I needed to end up with (at least) one partition that had 'OpenBSD' as its type and name. So I made sure to do it that way, which took me a few tries to get it right. After that, I had to create a BSD-style "disklabel". I happen to think those things are pretty crazy, but, well; it's how the BSD systems work. First, I made a 4.3BSD slice for my data (slice a), and next a swap slice (slice b) that was 10% of the size of the partition that I'd created for OpenBSD.

Or so I thought.

The problem was that none of the above steps used gigabytes, megabytes, or even kilobytes, as its unit; instead, I had to create partitions and slices in blocks. Not that I don't know what a block is, but it's not as easy to spot issues that way.

After I'd written the new partitions and slices, and started to format the a slice, suddenly the system decided to show me the size of the thing it was formatting after all. I didn't notice it immediately. But then it dawned on me...

It was formatting my entire hard disk. That's right, even though I had clearly and explained that it shouldn't touch anything besides these 10 gigabytes that I set aside for the thing, it still decided to go on and format everything. Aaargh!

I quickly switched the thing off, and rebooted it to check the damage. Of course, I didn't reboot it by using the system that I'd just corrupted; that would only make matters worse. However, since the Linux partition is near the end of the disk, it could just as well have been so that there was nothing wrong. Unfortunately, that was not the case; my ext3 partition had been corrupted. Luckily, not entirely; I've been able to rsync most of my data to another system, including the list of packages and most of the files in my home directory.

But the OpenBSD disk is sooo toast. No, really.