Category: Tech

Form and Function

A few weeks back, I rented Hellboy: Sword of Storms. It was a neat little movie, and adhered pretty well to the the comics' folklore vibe. The highlight was a sequence adapting Heads.

And it occurred to me, you know, the best Hellboy stories are 8-page adaptations of folk tales, in which Hellboy himself plays only a minor role. Similarly, wouldn't it be great to see some 10-minute Hellboy animated shorts?

It's a real pity that both 8-page comic stories and 10-minute animated shorts have fallen by the wayside. DC, at least, seems interested in bringing them back: they've been doing 8-page "secondary features" in some of their popular titles, and next week's animated Crisis on Two Earths will also include a 10-minute Spectre short. Which is the perfect length for a Spectre story.

And of course all this has me thinking, Why 22 pages? Why 22 minutes? Why 6-issue arcs? Stories should take all the time they need; no more and no less.

Which isn't to say that rigid parameters can't foster creativity. The BioWare Writing Contest I participated in a few years back had some very tight guidelines -- only so many characters, only one location allowed, and that location has to be a pretty tiny square. But in a way, that stimulated creativity. Sometimes, you need parameters.

Douglas Adams is a favorite example. His best Hitchhiker's Guide work was written for radio, with a rigid three-act structure and length requirement for each episode, with the requisite pacing those things entail. Those episodes were adapted as the first two books of the Trilogy. The third, Life, the Universe and Everything, was adapted from an unused Doctor Who pitch, so it was conceived around a predefined structure as well. The last two books, where Adams took a more freestyle approach, tended to flail a bit; they were adapted by Dirk Maggs for radio a few years back and, for my money, worked much better with his judicious editing.

(The awesomeness of The Long Dark Tea-Time of the Soul does not fit my narrative as, to the best of my knowledge, it wasn't adapted from a radio or TV format. The first Dirk book was, though.)

There are plenty of writers who could benefit from tighter restrictions. Will Eisner put as much plot in a 7-page Spirit story as Brian Michael Bendis does in a 132-page Avengers arc. Sometimes I like longer, decompressed stories that spend more time on the scenery and the atmosphere. But there should still be a place for those weird little Hellboy stories.

I recently read Fables: 1001 Nights of Snowfall. Its pacing and form were noticeably different from the typical Fables books, because of its format: it was written as a graphic novel, rather than simply collecting 6 issues of a serial comic.

(A tangent on nomenclature: I absolutely despise the term graphic novel as it is commonly used, ie as a synonym for "comic book" used by people who think they're too cool for Spider-Man. However, it is a useful term when used in its original sense, ie a comic written in long form instead of being serialized in stapled, 22-page, monthly increments.)

Of course, 1001 Nights isn't a graphic novel so much as a graphic short story collection -- far from being a longform Fables story that takes its time, it's a series of stories which are shorter and tighter than a typical issue of Fables. So actually, it's more along the lines of those 8-page Hellboy stories I've been yammering about.

More in the "paced like a novel" vein would be DC's upcoming Earth One books. While it is obvious that these stories need to be published, as nobody has retold Superman's origin story in over three weeks, it's going to be interesting seeing them told with a little more breathing room, without the overwhelming, breakneck pace of Superman: Secret Origin.

I kid, but you know, the nice thing about constantly retelling Superman's origin is that now the Siegel heirs get a cut.

At any rate, once the rehashes are done, it would be quite nice to see DC tell some new stories with these characters in this format -- stories as long or as short as they need to be, at whatever pace suits the piece, without having to speed toward a cliffhanger every 22 pages.

V for Vendetta is actually a decent example -- yes, it was serialized, but its chapters don't fit into a consistent, forced length or pace. And while some of the chapters were climactic action sequences of V stabbing people a lot, others had him simply soliloquizing about anarchy.

(And funnily enough, the guy writing Earth One: Superman is J Michael Straczynski, the same guy whose The Brave and the Bold is currently the best 22-page superhero book that actually tells 22-page stories -- but whose run on Thor was decompressed, organic, and even meandering. Which is not a criticism, as I loved his Thor; it's just a statement that the man can write very well in different formats.)

If the world is a just and beautiful place, Dr. Horrible's Sing-Along Blog is a template for the future of television. It manages the rather neat trick of adhering to a rigid structure that also just happens to be noticeably different from the traditional structure of a TV show: three 13-minute acts, each itself featuring a beginning, a middle, an end, and four songs. It's similar to, but distinct from, the standard three-act structure and 44-minute length of an American TV show.

Even The Daily Show -- God, not a week goes by anymore but one of the interviews goes over. Which is swell, but the way this is handled online is completely boneheaded: if you go to Full Episodes on thedailyshow.com, or view an episode on Hulu, you get the broadcast episode, which shows the truncated interview, followed by an admonition to check out the website, followed by Moment of Zen and credits. I can see this as an unfortunate requirement for broadcast, but guys, Internet videos can be more than 22 minutes. Why in the hell do I have to click through to a different page on the site (or, if I'm watching from Hulu, a different site entirely) to watch the rest of the interview? It's viewer-unfriendly, especially if you use your PC as a media center hooked up to your TV. Cut the full interview into the damn episode. Add an extra commercial in the middle if you have to. (It would be swell if you didn't show the exact same commercial at every single break, but that's a separate presumably-silly-and-useless "rant".)

At least they've wised up a little and started showing just the first part of the interview in the broadcast episode and then showing the rest in the "Full Interview" link on the website. It used to be they'd show a chopped-up version of the interview in the broadcast episode, meaning that instead of the Full Interview link picking up where the show left off, it had five minutes' worth of the same content spread out across it.

You know, it seems like the youngest of the major media is also the one with the least rigid requirements for length. Video games can be anything from a three-second WarioWare microgame to a persistent world that players sink years into. People may grouse a bit that Portal or Arkham Asylum is too short, but it doesn't prevent them from being highly-regarded, bestselling titles.

Which is, of course, not to say that longer games don't have to function under tight restrictions. They're often very high-budget affairs with a hell of a lot of people involved (as Dragon Age tries to forcibly remind you with its absurdly slow credits crawl) -- programmers, writers, artists, and so on. The Mass Effect games have voiced player dialogue and let the player choose Shepard's sex, which means every single one of those lines has to be recorded twice. (And frankly that doesn't seem like enough variety -- I have a Samuel L Jackson lookalike who says "aboot".)

And those restrictions are probably why every dialogue choice in ME is broken up into a predictable paragon/neutral/renegade choice. That kind of very-unsubtle delineation is exactly the sort of thing western RPG developers have been trying to get out of (as in both The Witcher and Dragon Age), but in the context of ME it works quite well -- I've even tried my hand at writing in a three-choices, no-hubs dialogue style and it works very organically. (For the ludicrous amount of dialogue in Dragon Age, there were places I could see the seams showing -- spots where I'd have three dialogue options and, as soon as the NPC spoke, knew that all three led to that exact same response. But that's probably a lot harder to notice if you've never written a dialogue tree yourself, and it's certainly an artform in and of itself, giving a response that works equally well for three different questions. I can only think of one occasion in the dozens of hours of Dragon Age where a writer screwed up and had a question hub that began with an NPC answering a specific question in a way that didn't make any sense if the dialogue looped back.)

And of course it's the medium that allows this kind of longform storytelling. Game length is no longer restricted by the arcade environment. Which is, of course, not to say that short-play games don't get made anymore -- Street Fighter 4 is a high-budget, "hardcore gamer" example, but Nintendo's entire business is built around games a casual player can pick up and play for ten minutes at a time. Ditto every Flash game on the Web, and most games on the iPhone.

And, indeed, Internet delivery is going to liberate other media from their restrictions. Eventually, we're bound to see shows like The Daily Show just run more than 22 minutes if they have to, and, God willing, we'll see more offbeat stuff like Dr. Horrible. The Web's given us comics as diverse as Achewood, Dr. McNinja, Templar, Arizona, and FreakAngels, and cartoons from Adventure Time to Homestar Runner to Charlie the Unicorn to Gotham Girls to the complete version of Turtles Forever. It's also allowed MST3K to continue in the form of the downloadable RiffTrax and the direct-order Cinematic Titanic.

Variety is the spice of life. I love comics -- and yeah, that includes mainstream superhero comics. But I'm sick of all of them having the exact same structure. Fortunately, I think we're on the edge of an age of experimentation.

Or another damn market crash. It is an odd-numbered decade now, after all.

A Random Thought

A thought: What are we going to call terabytes for short?

Megabytes are megs and gigabytes are gigs, but ters sounds stupid and awkward. So is teras (which only saves one syllable) going to become the norm, or are we going to go the K route and simply say T?

These are the kinds of things I think about.

What "Hacker" Means to Me

Recently, I made some comments on the unfortunate change in popular usage of the word "hacker", from a positive term for a skilled programmer, to a negative term for a skilled programmer, to a negative term for someone who can figure out Sarah Palin's zip code.

I like to think of myself as a hacker in the original, positive sense, and I have a story about what that means.

Ten years ago, I upgraded my OS to Windows 98. Unfortunately, during the upgrade my hard drive, which had been compressed using DriveSpace, one of the worst pieces of software ever, was corrupted.

Now, I'll grant I'm a pack rat, but there wasn't much of sentimental value on there. There was, however, the most recent installment of KateStory, Book IX. It turned out Steve had a backup, but it was incomplete.

That gnawed at me for years. I kept the hard drive and never wiped it, and every now and again I'd hook it up and see if I could find a way to recover the data. I could never get it to mount. My instinct was that I shouldn't be working with the physical drive anyway, that I should copy the data from it to an image so I could make additional copies and freely mess with them without worrying about losing the original data. But none of the disk-imaging tools I could find would image a disk that wouldn't mount.

By the summer of 2004, I was familiar enough with Linux to know that dd was the tool I wanted, that it would make a bit-for-bit copy of the data on a device regardless of whether it could make any sense of it. I copied the drive to a file and went to take a look at what I could do with it.

File recovery software pulled up some images and some old E-Mails, but not the ones I wanted. In fact, searching the raw hex, I found the text "Subject: Re: KateStory IX: Third Anni" followed by gibberish; the data literally went from plain text to incomprehensible compressed bytes in the middle of the subject line I was looking for. I abandoned the project for a few months.

As the fall rolled around and the KateStory's tenth anniversary approached, I got to thinking about it again. I looked up information on how to recover DriveSpace volumes, and happened upon Dean Trower's DriveSpace 3 Disaster Recovery Kit. Since it required DriveSpace to run, and since DriveSpace won't run on modern versions of Windows, I set up VMWare on my computer and installed Windows 98 on it. My memory of what I tried then is fuzzy; I'm not sure what I did wrong but I still didn't recover the data.

It seems like I tried a couple more things over the years that followed. I think there was a period where I thought maybe the compression I couldn't get past wasn't DriveSpace's but Netscape's. (In retrospect, I believe Netscape Mail's "compress folders" option didn't actually compress text, it just deleted the text of E-Mails that had been deleted from the mailbox but not removed from the mail files.) I definitely remember at least one occasion where I dumped the entire 545MB hard drive image into a Thunderbird folder -- now, whether or not I qualify as a hacker, I think we can all agree that qualifies as a hack. When it didn't work under Thunderbird, I found old copies of Netscape 3 and 4 and tried it there; that didn't work either.

About a month ago, with KateStory XVII beginning, the anniversary approaching once more, and my going back through Books XIII-XVI to put them on this site, I got the urge to take another crack at IX. I did what I'd done before: set up VMWare, set up Windows 98, and got a copy of the Disaster Recovery Kit.

Without getting into too much detail, a DriveSpace "compressed drive" is actually a single file stored on a physical hard drive, then mounted as a virtual drive. As I said, I couldn't mount the drive. The docs for Trower's program mentioned creating an empty DriveSpace volume and looking at its file header; I got the idea from there to look at the header bytes on a fresh file and see where I could find them in my disk image. I found them -- the beginning of the compressed file -- and deleted everything prior to them on the image. (It bears noting that at this point I had numerous backups of the image and wasn't hacking up my only copy.)

Following the advice in Trower's Readme, I started with the simplest solution: copy the compressed file to a host drive and see if Windows mounts it. He cautioned that it might not work and Windows's attempt to "fix" the corrupted data could hose it; he was right. I was thrilled to see the filenames in the root directory show up, but I couldn't access the data in any of them.

On to step two: I tried using Trower's decmprss program. I tried it several times and discovered that it kept outputting empty files; they were the same size as my image but made up entirely of zeroes.

There was a line in the Readme: "DCMPRESS ought to work under Windows, but nevertheless I recommend running it in MS-DOS mode." All right. I did a Shut Down/Restart in MS-DOS Mode, but Windows 98 and VMWare weren't quite playing nice; any time I did that DOS would run for a minute or two and then freeze up and require a simulated hard reset.

So I went back to Windows, and checked to see why decmprss was outputting empty files. I started by trying it on a new compressed image that I knew didn't contain any corrupt data. I got the same result, proving that it wasn't just a problem reading my corrupt image.

Trower's toolkit included the source code, so I jumped into it to see if I could find out what was wrong. For the first time in years I found myself coding in Pascal -- coincidentally the same language Dr. Wily teaches at Prescott High School in KateStory IX. I didn't do anything particularly clever, just added some traces to see where the problem was occurring. I confirmed that the problem lay not in the Pascal portion of the code, but in the x86 assembler.

All right, I thought, my guess is that Windows 98 doesn't like the direct system calls that the assembler portion of the code is making. So that takes us back to trying to run it under DOS -- and if that doesn't work, the only thing left to try is to learn x86 assembler and pore through the DriveSpace API.

Booting to DOS from Win98 shutdown still didn't work, but it turned out that picking it from the boot menu worked just fine -- once I went into OSX's keyboard settings and disabled F8 for pulling up Spaces so I could use it in VMWare.

That worked, and generated a file that contained KateStory chapters that, I could confirm, were not in the copy I had.

That would be where the rest of Trower's toolkit came in -- reassembling files that had been partially compressed -- but I was confident that KateStory IX had been entirely compressed. So now it was time for my Thunderbird hack.

So I copied the entire, 1GB+ uncompressed image into Thunderbird's mail folders. Success -- Thunderbird correctly parsed out all the files that were E-Mails. I sorted them out, exported the ones that had "KateStory IX" in the sub line, and copied them out of the Win98 VM into my "real" system. From there I went through them all, cut out the stuff that was redundant or off-topic (which was most of it), and lo: today, this fourteenth anniversary of the original KateStory and eleventh anniversary of this installment, I have KateStory IX in its entirety.

So, back to my initial point: what does "hacker" mean to me? Well, eleven years ago my friends and I wrote a goofy story. Ten years ago, I lost it. And over the intervening years, I used my skill and my determination to get it back. (A friend once told me that when I want something I go after it like a pit bull, I don't let go. Comparisons to pit bulls may be the only thing Sarah Palin and I have in common.) I'm not some scary terrorist stealing your credit card or breaking into the Pentagon, I'm a guy who used his skill to recover a lost piece of his childhood.

Of course, I'm sure there are those who will say this doesn't make me a hacker. And maybe they're right. In the final analysis, all I did was use the dd command, set up a virtual machine, install Windows 98, do some very cursory hex editing, boot to DOS, use someone else's recovery tools, and copy a giant file into Thunderbird's mail folders. When all's said and done, I only wrote a few lines of code, and all they wound up doing was confirming what the Readme had already told me. So maybe that's not enough to qualify me as a hacker.

But you know what? If that's not enough to qualify as hacking, then plugging Sarah Palin's zip code into a password hint field sure as shit isn't.

Devaluing Language

The news media have been misusing the term "hacker" for at least the past two and a half decades -- to the point that their definition has become the accepted one, and a formerly positive term has developed a terrible stigma. But apparently the past 25 years of shoddy "journalism" on the subject were just not sloppy enough, because now they can't even adhere to their own stupid and wrong definition of the word -- as evidenced by a million articles currently claiming that Sarah Palin's E-Mail was hacked.

By all accounts, a scammer gained access to Sarah Palin's account by using the "reset password" feature -- and, allegedly, the secret question she had used as the key to resetting her password was her zip code.

Let me be absolutely clear on this: Knowing how to use a phone book does not make you a hacker. If you think it does, shut up, because you are stupid.

"Hacker" used to be a positive term. And then, it became a negative term that at least implied some level of skill. Now, it apparently means anyone unscrupulous who has at some point been in the same room as a computer.

Hell, when our Internet connection goes out, I call the cable company and tell them I'm my roommate, because his name's on the cable bill and they won't talk to me if I tell them the truth. Apparently that qualifies as "hacking" now.

WordPress

You've probably noticed the site looks different.

Or, if you haven't because you're reading this via RSS, you've probably noticed you just got ten duplicate entries in your reader.

That's because I just migrated my backend over to WordPress.

As I alluded in a recent post (and yes, I update so seldom that three months ago qualifies as "recent"), b2evolution reached a point where it made even the simplest tasks a chore. A quick rundown:

  • As noted before, it refused "id" and "name" attributes in <a> tags. In other words, it would not allow me to use anchor tags as anchors.
  • Its error messages were hideous. "Invalid URL" may be useful information in a post that has as many as three links in it, but when you have fifty, it's the coding equivalent of punching me in the gut and then pointing and laughing. And for those of you who have not yet taken a 100-level programming course, it bears noting here that telling me which URL was causing a problem would take maybe twenty characters of additional code.
  • Not only wouldn't it tell me which URL was a problem, it wouldn't tell me why. I had to poke through a gigantic list of blocked URLs before I discovered that b2evolution had for some reason automatically blacklisted all mac.com sites.
  • Okay, this is the best one. You think blocking mac.com is bad? Check this out. In the same post, I linked to a rather lengthy driver URL -- go ahead and mouse over that link and see what I mean -- and b2evolution rejected it.
    See anything wrong with it? No? Neither did I. It took me about an hour to figure out what was happening. Here's the problem:
    The link contains the string "&ProductID". See where I'm going yet? No, you probably don't; even if you know that the HTML code for an ampersand is "&amp;" it probably hasn't hit you what happened there.
    So okay, here's what happened: b2evolution saw the "&Product" in that link, expanded it to "&amp;Product", and then, on a second pass, turned the ;P into a smiley.
    Hang on, it gets better: there is no way to disable smileys in the b2evolution admin control panel; you have to hack the PHP manually.
    Hang on, it gets even better: there actually is a checkbox in the control panel to allow you to disable smileys...and it is grayed out by default. Someone went to the trouble of actually coding up an easy fix...just to make it impossible to use.

In short, b2evolution was like everything my old web host ever gave me: at first, it was a generous gift and gave me an outlet to share my thoughts with the world, but over a period of years it became less and less bearable up until it reached a point where I simply couldn't go about my daily business anymore without it making my life unpleasant.

Actually, catty remarks about Internet drama aside, this is a coincidence -- I started this overhaul several days before Sharkey decided to pull up stakes. However, it's a happy coincidence, and it's nice to see him carve us out an alternative to Crazytown.

Anyway, on to the technical side, for anyone else who has WordPress questions. On the whole, I think WP is better so far. I absolutely despise "smart" quotes, and it parses text inside <code> tags just as poorly as b2evolution, if not even worse, but fortunately I found two plugins called Unfancy Quote and Preserve Code Formatting which take care of those two problems right out the gate.

I think I've done a pretty good job with the new theme, taking the old look and making a few modest changes to it. (I've finally retired that silly-ass old digits.com counter. It is the end of an era.) The CSS is my own, but the PHP code is largely adapted from Sandbox. As such, it's GPL'ed code, so once I'm finished tweaking it I'll put a zip file up just in case anyone wants to eyeball my source.

If there's anyone else trying to migrate old-ass b2evolution (0.9 series) to WordPress, there are a couple different ways to do it. You can convert to Movable Type and import natively (tutorial at Insert Witty Title), which preserves categories but hoses custom slugs, or you can use a conversion PHP script (tutorial at ibrian, though there are a few different versions of the script), which preserves custom slugs but hoses categories. I opted for the latter since it's less of a pain to recreate categories than slugs, but YMMV; if you never used custom slugs and just stuck with the default post titles, I'd say try the former. (There is something in there about how b2evo replaces spaces with underscores and WP replaces them with dashes, but there should be a tool to correct that too.)

Anyway. New blog, new forum. Let me know what you think. Maybe one of these days I'll get up the courage to dust the cobwebs off my Links page.


Playing: Super Mario Galaxy.

Reading: Just finishing Dune.

Security Flaw Found in Door Technology: A Machinist Exclusive

Howdy, folks; it's yer old pal, Crispus T Muzzlewitt!

As you fellers well know, when I ain't writin' fer Salon's Machinist blog, I spend most o' my nights sleepin' on park benches or in boxcars. And as I have so often remarked, it's the good life -- except fer them damnable folk what live in houses. Always yammerin' on about how good they got it. "Hey Crispus," they'll say, "it sure is harder to get rained on with a roof over your head." Or "Hey, bum, you could sure use a shower." Or "Hey there, Mr. Muzzlewitt, it looks like somebody stole your bindle while you were passed out on that park bench."

Smug bastards. I hate them all so very, very much. With their clean clothes and their straight teeth and their "Hey Crispus, you'd probably have a lot fewer headaches in life if you had a bed to sleep in and if you didn't smell like gin and urine."

So it is with no small amount of glee that I announce my recent discovery that houses are actually no more secure than the wide open spaces where I rest these bones. Sit down, young'uns, and let me tell you a tale.

'Tweren't long ago I was approached by the right honorable representative of a local security firm, and he done dropped a bombshell on me: houses don't keep folk out at all!

And my esteemed colleague Battlin' Joe Frickinfrack confirmed he done saw it with his own two eyes: a seedy-lookin' feller walked right up to the front door o' one o' those fancy houses like you see sometimes, and when the owner unlocked the door, let him in, and then wandered off somewheres, why, the seedy-lookin' feller done robbed him blind. So you see, it's just like my bindle -- front doors don't offer you no more protection than a park bench in the moonlight on a mild autumn night.

Another thing: I keep hearin' about folk who keep their valuables in safes, 'cause they think it's safe, on account o' the name maybe. But truth is, safes ain't no safer'n a lady's purse. Sure, you see a lot more purse-snatchin's than safe-crackin's, but that's only 'cause more folk got purses than has safes -- safes just don't make no sense as a target; why crack a safe when it's so much easier to snatch a purse? But it can be done, and easy, too: Battlin' Joe says that there burglar I wuz talkin' 'bout a minute ago also managed to get all the money outta that man's safe, on account o' the man gave him the combination.

I talked with a gentleman from Norton Home Security about this problem, and he said that, rare as it may seem today, it'll be an epidemic in the comin' months, and every homeowner everywhere needs to go right out and buy a Norton Home Security System. He then went on to add that he has absolutely no conflict of interest in makin' that partic'lar recommendation. And shucks, I believed him, but just to be thorough, Salon sent out its star reporter, Judith Miller, an' she confirmed that her source has absolutely nothin' to gain by exaggeratin' the threat posed by this enemy.

So there you have it, you smug sumbitches, with all yer fancy "doors" and "walls" -- now we know the truth. Houses ain't no more secure than parks, 'cause you can unlock the front door and let somebody in; safes ain't no more secure than purses, 'cause you can tell people the combination and then they can crack them, and OSX is just as vulnerable as Windows, on account o' if you allow root access to a suspicious program it can do bad things to yer computer. So wipe them smirks off them damn faces; yer house ain't no safer than my bench nohow.

So that'll do fer now, but I reckon this'll be the first in a three-part series. Next time, I'll talk about how roofs are overrated 'cause rain still gets in if you knock giant holes in them with sledgehammers, and in our final installment, I'll examine how showering and that there underarm deodorant them rich folks use don't do nothin' to make you smell better if'n you rub pig shit all over yer body immediately after.

Thank you, and goodnight.

Hobo names supplied by John Hodgman.

Triple-Booting a Mac Pro

Updated 2007-10-14. Scroll down to where it says "Update 2007-10-14". I'd put a link here, but for some reason b2evolution will not let me use the "id" or "name" attributes; expect a presumably silly and useless "rant" on that subject very, very soon. (Update 2008-01-17: Switching to WordPress fixed the problem.)


So I got that Mac Pro I was talking about earlier. No, I still can't afford the thing, so if you notice me living a life of indentured servitude for the rest of my days, well...I'm Irish. We're used to it.

The bastard about being on the bleeding edge is that there aren't a whole lot of guides to walk you through your setup. For example, I found quite a number of guides on how to multiboot a MacBook Pro with 3 OS's on different partitions of the same drive, but approximately bupkis on how to do it on a Mac Pro with each OS on its own drive.

So, in case anyone winds up Googling for the same information I couldn't quite find, here's how I finally did it. Hopefully this'll make it easier for you than it was for me.

Installation and booting

I can't say for certain, but I think order of drives and order of installation are both important.

After some trial and error, I wound up laying my drives out like this:

Drive 1 is Kubuntu.
Drive 2 is OSX.
Drive 3 is Windows XP x64.

Leastways, that's how they're set up in hardware. For reasons I'm not altogether clear on, they show up in software as Kubuntu on sda, Windows on sdb, and OSX on sdc. Still more curiously, both the Kubuntu drive and the OSX drive are assigned SCSI ID 0,0,0. (Could be some holdover from the old master/slave days? Maybe the drives are on different controllers? Something to do with MBR vs. GPT? Is it because the Kubuntu drive is physically first but the Mac drive boots first? Don't know.)

Order of installation seems to be important too. I say this because my first time through, I installed Kubuntu, it ran fine, and then I installed Windows and Kubuntu wouldn't boot anymore. I'd click on the Linux icon and it would boot the wrong OS. (Actually, it still does; more on that later.) So, as with most things in life, everything was going great until I installed Windows.

But after a day and a half of banging my head against the wall, I finally got all 3 OS's moving by rearranging the drives (see above) and installing Windows first and then Kubuntu. (OSX, of course, was preinstalled.)

Things to keep in mind: since we're talking 64-bit Windows, the Boot Camp program is useless. You can ignore it. It might be useful for resizing your OSX partition since Windows insists, for no reason whatsoever, on writing system files to the first drive. I say "for no reason whatsoever" because you can move those files -- boot.ini , ntdetect.com , and ntldr -- to the drive Windows is installed on and it'll run just fine. There's more info at x(perts)64; that guide is specifically for dual-booting XP and Vista, but I found it useful anyway.

(Also, "the first drive" noted above is actually the second drive in my case, which caused a good deal of confusion; as I mentioned earlier, both the Kubuntu drive and the Mac drive show up as 0,0,0.)

It's also worth noting that the much-ballyhooed rEFIt doesn't work for me; I have to hold down Option at startup to get a working boot menu.

That menu gives me the following:
rEFIt, Windows, Windows, Windows
because EFI very helpfully assumes anything that's not Mac is Windows.

The first "Windows" is actually Kubuntu. The second gives me "Error loading operating system". I assume that the first "Windows" is the MBR of the drive and the second is the first partition, which is flagged bootable but doesn't have Grub on it.

The third "Windows" is actually Windows.

Now, rEFIt looks similar -- it offers "Boot Mac OS X from Mac", then "Boot Linux from HD", "Boot Legacy OS from HD", "Boot Windows from Partition 1", not always in that order -- but the last three all open the same OS, either Linux or Windows depending on which I booted more recently.

So I'm stuck with holding Option at boot and selecting the left Windows or the right Windows, but at least it works. I'm hoping future versions of rEFIt fix this problem.

Windows

Here's where you can find the necessary 64-bit drivers for Windows:

(Sources: Triple Boot thread on the Apple forums; Airport Driver thread on driverguide.com forums)

Kubuntu

Boot issues aside, this is the single most painless Linux installation I have ever experienced. I know there's no dearth of people singing the praises of Ubuntu and how close it is to being ready for desktop use, but I'm afraid I'm going to have to add my own redundant voice to the chorus. It was almost painless.

I still had to install the nVidia drivers by hand -- either get us some free drivers that work or stop being so damn concerned about ideological purity, guys; I need support for my video card, and this would make life pretty rough for the average user. But by my standards as a Linux vet...I didn't even have to touch xorg.conf. Kubuntu, how I love you.

Setting up wireless was another concern, especially when I read there was no native support for the adapter and I'd have to use ndiswrapper. Let me explain something about ndiswrapper: it was a bastard to install under Gentoo, and is responsible for every single kernel panic I've experienced in the past year and a half.

Under Kubuntu, on the other hand, it was over in minutes. And I don't want to jinx it, but it hasn't panicked my kernel yet.

There's a HowTo at ubuntuforums.org. Steps 1-3 are outdated now; Feisty comes with a current version of ndiswrapper, so you won't need to update it. As for the bcmwl5.inf file, it's the same one in the Dell package I linked above.

To get wireless to work immediately at boot, you'll also need to set your access point up. In Kubuntu, you do go to K → System Settings → Network Settings, click "Administrator Mode", enter your password, click wlan0, then Configure Interface, and enter the ESSID and WEP key. (DHCP and "Activate when computer starts" should already be set.)

I will note that on one of my reboots wireless didn't start up automatically and I had to run iwconfig myself. I think that's most likely due to signal interference in my apartment, but I can't say for sure at this point.

Sound support was the biggest problem I hit. The ALSA driver for Feisty doesn't support the Mac Pro's audio adapter.

After poking around for awhile, I decided that rather than bother with the individual package, I'd just go ahead and upgrade to Gutsy RC. After all, if you've even read this far, I'm guessing you're somebody who's not afraid of the letters "RC"; I'd advise you just to go with Gutsy from the start. (Course, by the time anybody actually reads this guide, I'm betting Gutsy final will be out.)

So far Gutsy's working just fine for me. (Update 2007-10-14: Except that I can't adjust volume from the keyboard. The bar goes between 0 and 11 but doesn't actually make any change in the volume. This appears to be a known bug in Gutsy at the moment.)

I'll edit this post if anything changes or if I find anything else out -- I have a Bluetooth keyboard and Mighty Mouse that I haven't bothered trying to set up in Kubuntu yet; I intended it more for my media center/emulation rig Mac Mini anyway. But if I get that, or anything else set up, I'll make a note of it here.

Hoping this has been a help to somebody. I don't usually do this, but when I find myself running into problems that aren't well-documented, I figure I may as well document them myself in the hopes that I can make life a little easier for the next guy.

Good luck, next guy.


Reading: Cat's Cradle again, the first in my "My favorite recently-deceased science fiction authors" theme. I think A Wrinkle in Time is probably next.


Update 2007-10-14: Accessing the Mac drive from Kubuntu

It's easy enough to mount an HFS+ volume under Linux (FS type is just "hfsplus" in mount or fstab), but accessing your home directory or mounting with write permissions is a little trickier.

To access your home directory on the Mac volume from Kubuntu, your Mac user account and your Linux user account need to have the same UID. There are a number of ways to do this; the easiest involve simply creating a new user, but I changed the UID on my Mac login to 1000 with no real trouble.

Just go into Applications/Utilites and run NetInfo Manager, click Users, then your username, then scroll down to uid and gid and change them both to 1000 (or whatever your UID is under Linux -- 1000 is, of course, the default number for the first user account).

After that, you'll need to log out and back in, pull up a terminal, do a sudo chown -R <username>:<group> /Users/<username>, and then log out and back in again.

My source on all this is the Gentoo wiki (even though I'm using Kubuntu).

That should give you write access to your home directory on the Mac drive from Linux. To get read access, you'll need to disable journaling.

It occurred to me that I'd like to keep journaling enabled in OSX and only disable it when I want to access the data from Kubuntu. I came up with a relatively simple solution: I wrote a script to enable journaling when OSX boots, and added a line to the shutdown script to disable it.

For the startup script, I created a directory called /Library/StartupItems/EnableJournaling containing a filepair called EnableJournaling and StartupParameters.plist, as follows:

StartupParameters.plist

{
Description = "Enable Journaling";
Provides = ("Journaling");
OrderPreference = "Late";
}

EnableJournaling

#!/bin/sh

. /etc/rc.common

# Enables journaling on Mac volume

ConsoleMessage "Enabling journaling on /Volumes/Mac"
diskutil enableJournal /Volumes/Mac
exit 0

(Don't forget to make this file executable.)

(Source: Greg Neagle's blog)

And I modified /etc/rc.shutdown to the following:

#!/bin/sh
# Copyright 1997-2004 Apple Computer, Inc.

. /etc/rc.common

if [ -f /etc/rc.shutdown.local ]; then
sh /etc/rc.shutdown.local
fi

SystemStarter stop

# ADD THIS LINE:
diskutil disableJournal /Volumes/Mac

kill -TERM 1

exit 0

Seems to work all right; I get journaling when I'm running OSX, and I get write access when I'm running Kubuntu. (Update 2007-11-05: It appears rc.shutdown is gone in Leopard. I'll update when I learn more.)

The bad news is that it doesn't work both ways. At present I have Kubuntu installed on a ReiserFS volume, which is unsupported by OSX. I could have made it an ext3 FS instead and installed the ext2 driver for OSX, but, well, if I wanted compatibility over performance, I probably wouldn't have gotten a Mac Pro.

Thad's Tech Tips

Hello, random Googler. This one is for you.

Today's post is about some issues I've been having at work with an old Web server running Fedora Core 2. For various reasons, I have been attempting to update the packages on this old piece of junk to the latest available versions. (That is, the latest available for FC2; I'm not going to try the Herculean task of updating to 7.) For those of you who are not interested in technical details on server administration, this post is not for you; it is for the random Googler who found this page by searching for some of the keywords in the below explanation. Keywords like 4f2a6fd2, 6cdf2cc1, yum, GPG, and zlib.

The reason that I am posting this is that I have spent several days figuring this shit out for myself, with only minimal aid provided by Google searches; there seems to be no information anywhere detailing this set of problems, and I'd like to make life a little easier for the next poor bastard caught in this situation.

Problem #1 is finding a yum repository. The Fedora Legacy Project has shut down. There are still a goodly number of mirrors operational as of this writing, but my copy of yum rejected a number of them based on errors like the following:

Gathering header information file(s) from server(s)
Server: Fedora Core 2 - via Fedora Legacy Project
retrygrab() failed for:
http://[...]/fedora/2/os/i386/headers/header.info
Executing failover method
failover: out of servers to try
Error getting file http://[...]/fedora/2/os/i386/headers/header.info
[Errno 4] IOError: HTTP Error 404: Not Found


A couple of URLs I've found that do have the header.info file are:

http://www.blagblagblag.org/pub/mirrors/fedoralegacy/fedora/$releasever/updates/$basearch/
http://fedoralegacy.mirrors.redwire.net/fedora/$releasever/updates/$basearch/

and the latter, conveniently, is even the top option in the default /etc/yum.conf . So just comment out the Main Fedora Updates section and uncomment the pertinent lines under Fedora Legacy Project.

(Aside gripe: b2evo apparently automatically turns URLs into links, even if they are obviously bullshit URLs. Update 2008-01-17: Switching to WordPress took care of this problem.)

Then comes my next problem:

warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 4f2a6fd2
Error: Could not find the GPG Key necessary to validate pkg /var/cache/yum/updates-released/packages/pango-1.4.1-1.i386.rpm
Error: You may want to run yum clean or remove the file:
/var/cache/yum/updates-released/packages/pango-1.4.1-1.i386.rpm
Error: You may also check that you have the correct GPG keys installed


It turns out that key is actually located on the default install. Just do:

rpm --import /usr/share/doc/fedora-release-2/RPM-GPG-KEY-fedora

You'll probably also want to import http://www.fedoralegacy.org/FEDORA-LEGACY-GPG-KEY.

You'd think that would be the end of my GPG problems. But you'd be wrong.

warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 6cdf2cc1
Error: Could not find the GPG Key necessary to validate pkg /var/cache/yum/crash-hat/packages/zlib-1.2.2.2-0.i386.rpm
Error: You may want to run yum clean or remove the file:
/var/cache/yum/crash-hat/packages/zlib-1.2.2.2-0.i386.rpm
Error: You may also check that you have the correct GPG keys installed


Now this one turned out to be a bit tricky. All my Google searches for "6cdf2cc1" turned up people trying to install a certain open-source anti-virus program (I'm omitting its name because if you're like me, you'll see page after page of results mentioning that program and then attempt a Google search which removes that search term). Very few mentioned zlib, and none told me where I could find the appropriate GPG key.

After some further banging my head against the wall, it occurred to me to ask myself what set zlib apart from all the other packages, since they hadn't given me any errors.

As it turns out, zlib was the only package hanging out in the /var/cache/yum/crash-hat/packages directory. It was, in fact, from a different repository, not the Fedora Legacy repos listed above.

So I Googled crash-hat and the very first match was titled CrashHat YUM Repository. It linked the appropriate GPG-KEY and that was all I needed; at last I could update my server. Now it is merely ancient, not decrepit.

With any luck, this may help fix some of the other issues the server's been having. Perhaps more on those at a later date.

Another Love Letter to Microsoft

Here is what I love about Windows 2000's network configuration.

First of all, if you uninstall a network card -- say, for example, because you are having trouble getting it to work, perhaps trouble that suspiciously coincides with the latest round of Microsoft patches --, and then reinstall that card, you will find that your network settings have defaulted back to DHCP instead of static IP.

So you'll have to re-enter your IP.

If the machine you are currently working on happens to be a Web server that uses 250 different IP's, you will have to re-enter your 250 IP's.

But Thad, you say, that is awesome! How could life possibly get any better?

Well, it may seem difficult, but it does get better.

You can only enter one IP at a time.

And you can't copy and paste.

And no matter how many dozen times you enter the netmask 255.255.252.0, it will always default to 255.255.255.0.

And and every single time you tell it to add a new IP, it pops the new IP window up right on top of the list of existing IP's. So that if it is, just for the sake of argument, 11:30 at goddamnfuckinghellshitcock night and you are entering 250 different addresses, you have to scroll a bar and then drag a window to see the last one you entered. In the absurdly unlikely event that you somehow have trouble keeping your place under those conditions.

Awesome enough for you?

Yes, I am sure you are saying. Yes, that is just incredibly, unspeakably awesome. There is no possible greater threshold for awesomeness.

Well shut up, you're wrong.

Let's say you make a mistake. Let's say you somehow enter the same IP address twice. I know, there is absolutely no way of that happening under the circumstances, but bear with me in this thought experiment.

Let's say you enter an IP twice. It doesn't like it when you do that.

But does it tell you when you enter the redundant IP? No, that would make too much sense. Does it just delete the redundant IP itself seeing as the two are identical? Of course not. That would be stupid. That would require someone at Microsoft to write an entire extra line of code.

But Thad, you may say, surely they must at least tell you which IP is redundant?

My friend, where's the fun in that? Why tell you when they can instead just make you strain your eyes staring at every single IP you've entered?

Oh, and also, there's no way of sorting them.

They don't pay me enough for this shit.

Escape from Crazytown

A thief comes during the night and steals 13 oxen.

Hello!

I have migrated my site to a new server!

Because it turns out that my previous hosting provider is a shining example of what I mentioned in my previous post about how all my friends are currently campaigning for the office of Mayor of Crazytown.

I would like to thank my previous hosting provider for three and a half years of hosting which was relatively free of capriciously removing the site and pretending it was an accident. And even before that, a redirect to the ol' BBS waaaaay back in '01. We had some good times, buddy, and I wish you all the best; take your ice cream cone and run with it.

On another topic, I would like to share some useful information with random people who have found this site with Google!

If you are in the process of migrating your site and don't want to ask for help from your hosting provider because your hosting provider is currently campaigning for the office of Mayor of Crazytown, and if you need to export your MySQL DB (say, for example, because it has all your blog data on it), here is the operative command:

mysqldump -u username -p dbname --single-transaction > foo.sql

That "--single-transaction" flag is key if you're getting the following error:

mysqldump: Got error: 1044: Access denied for user 'username'@'localhost' to database 'dbname' when using LOCK TABLES

Because what that generally means is you have read access for the DB, but you don't have permission to lock it.

Don't say I never gave you anything, random Googler.

(Also, now that I have migrated the site to a server I control, I can set the whole mysqldump thing up as a cron job. Whoo redundancy! Whoo redundancy!)

I hope that you, my loyal readers, as well as random Googlers, will continue to follow my very boring exploits as I continue to chronicle them -- this time on a new server.

Huzzah!