Category Archives: Computers

Important Safety Tip

If you are trying to get Gentoo Linux running on a machine with a SATA hard disk, you will either need to pass nolvm2 to the kernel at CD-boot time, or issue the command dmsetup remove_all after you’ve booted.

Otherwise, mount will frustratingly claim that the SATA-disk partitions are busy when you try to mount them after having created them and their resident filesystems with cfdisk and mkfs.

Given current hardware trends, the percentage of first-time users attempting to set up Gentoo on a SATA disk would seem likely to vastly outstrip the percentage of those needing LVM2 functionality out-of-the-box; given that, the decision to favor the former at the expense of the latter seems… ill-considered at best. But then, I wasn’t consulted.

How Long? Not Long.

“…’cause what you reap is what you sow.”

Well.

It turns out that the problem might have been with avestriel’s disk after all.

That seems the obvious conclusion, anyway, given that the thing died an ugly death this morning. I took it offline to check up on a filesystem inconsistency, and was informed that the inconsistency could not be resolved without using --rebuild-tree. “No problem,” thought I. “I’ve done it once before.”

Well, yeah, except that last time I hadn’t been treated to controller-level DMA timeout errors when I was roughly a third of the way through the process. “Ooookay,” I thought, trying not to panic, “maybe it’s the controller. Or the cable. Or the power supply.” Easily tested: yank the drive, plug it into a different machine using a different cable. Hope, hope, hope. Nope. Same result.

Bugger.

The drive is currently sitting atop the case of the second machine, powered off. I’m hoping that being allowed to cool off for a bit will somehow make it happy. (It should give you some idea of just how desperate I am at this point, that I’d be willing to clutch a straw so thin.)

If that fails, I will have to do something I’ve never done before, and solicit the services of a professional data-recovery firm. There’s an assload of mail on that disk that I’d rather not lose. (Recommendations as to reputable firms in this area would be gratefully accepted.)

Once that’s arranged, I will have to hire the services of a different sort of professional firm to kick my own ass to the degree it deserves. I don’t think I’m up to the task myself. I mean, the drive all but sent me an engraved suicide pre-announcement. I have no excuse for not having made backups by now. None. Yet here I am.

Memo to self: the next time smartmontools so much as sneezes, buy a new drive and toss the old one. The headache spared will more than offset the money spent. And start making regular backups, for frigsake. Idiot.

Dearth of Venice

About a month ago I decided that it was time to put my Athlon XP machine out to pasture. The three-year-old motherboard and CPU offered few opportunities for reasonable upgrades, and the motherboard had suffered more than its share of indignities. (One of the memory sockets had had a few of its pins bent by a careless heatsink-removal attempt; a few of the capacitors had sprung leaks, and while Bill helped me replace those, some of the front-panel I/O headers seemed to have failed somewhere along the line.)

Ah, well, thought I, it’s time to find out what life is like in 64-bit-land anyway. So I proceeded to do a little research, decided that Socket 939 was the way to go, and ordered an Abit AV8. I chose Abit because I fell in love with the company’s highly-tweakable BIOSen long ago, and the AV8 because it’s a no-nonsense PCI design based on VIA’s KT880 Pro chipset. This machine is going to be a Linux workstation: PCI Express is clearly the wave of the future, but there’s no point in placing a workhorse on the bleeding edge.

Linux also motivates the choice of chipset: while the members of the nForce family generally outperform their VIA counterparts, nVidia tend to be highly-proprietary bastards when it comes to technical data, making Linux support patchy. Bill got badly burned by this a while back, when he tried to make an SFF nForce 2 box his home Linux machine. (Come to think of it, I wasn’t all that thrilled with the nForce 2 even under Windows. It was fast, to be sure, but it had all kinds of weird and sometimes-dangerous quirks and compatibility problems. They seem to have ironed this sort of thing out in nForce 3 and 4, but I’ll let someone else play guinea pig this time around, thank you very much.)

At any rate, the board arrived scant days after I ordered it. I was on the verge of picking up a Winchester-core Athlon 64 for it when Alex happened to lend me an issue of c’t containing a detailed description of Intel and AMD’s processor roadmaps. From it I learned that the Winchester Athlon 64 I coveted was already on the verge of being rendered obsolete by the new Venice core, which was to be released that very day.

Naturally, “released” is a many-splendored term, especially when it comes to two companies like Intel and AMD (or nVidia and ATI) engaged in a years-long struggle to club each other over the head with anything that comes to hand. In this context, “released” apparently means “we put out an announcement, and shipped a handful to hardware-review sites we like.” It’s got sweet fuck-all to do with “you can plunk down your cash and actually buy one, sucka.”

So here I’ve been for the last month, on tenterhooks, sure that if I waited just a few more days, the floodgates would open and a cornucopia of purchasable Venice-core CPUs would spill forth. The best estimate I’ve heard so far is Friday, May 6th. “Soon, baby.”

Of course, with my luck, it’ll turn out that my motherboard needs a flash upgrade before it can use a Venice CPU, and all of that waiting will have been in vain. Let’s hope not.

Puzzling Evidence

avestriel crashed again on Sunday and Monday nights — both times around 2:00 in the morning. Strange. It’s been fine since, having made it through Tuesday and Wednesday nights uneventfully. Stranger.

I left the office window wide open on the crash nights, and it got pretty cold in there. It seems unlikely that that could be the cause, but stranger things have happened. (I also had a chance to open up a power supply that’s the twin of avestriel’s yesterday, and was properly horrified at the sight of the great big amoebic blobs of solder that lurked beneath the cover plates. I’d like to believe that something that ugly is the cause of my problems. Of course, if it is, I have to ask the attendant question: is it worth spending any additional money buying replacement parts for machine that’s that old?)

No, I still haven’t backed it up, and I still haven’t brought its replacement up. Too much other stuff to do.

Another Satisfied Customer!

I spent a couple of hours this afternoon walking my new brother-in-law through the diagnosis and repair of the damage done to his computer by a freak moving accident that occurred yesterday. Somehow, relocating the thing between outlets killed its power supply. Don’t ask me to explain how that’s supposed to work, but at least the power supply, an Enermax, did its job by dying without taking any of the more delicate components with it.

The recovery process involved recommending a good power-supply tester, and a good power supply. (He decided to get both at once, figuring that if the problem was his old power supply, he’d save himself a second trip, while if it wasn’t, he could always return the new power supply later.)

Fortunately, it was, the new Antec NeoPower 480 he bought seems to fit the bill perfectly, his machine is once more chugging along, and my sister doesn’t have to cede back the box he handed down to her so that he can play World of WarCraft.

I think this makes the third weekend in a row that I’ve been on the phone doing technical support for members of my extended family. On the one hand, it’s satisfying to help folks get their stuff working again; on the other, I can’t help but feel the occasional temptation to fake a learning disability.

(Then again, it marks one of my few positive accomplishments this weekend, so perhaps I shouldn’t knock it.)

udev, how do I love thee?

When the final trumpet sounds, and the Linux kernel is called to account, the ledger eternal will bear witness to its numerous crimes and misdeeds — yeah, autofs, I’m looking at you — but udev, the 2.6 device-management infrastructure, will emphatically not be among these. No, it will go in the other column, the one that makes the case for redemption and eternal life.

udev is device management done right, elegantly and with just the right degree of abstraction: it handles USB dongles and PCI cards with equal aplomb, yet its configuration syntax is not so abstruse as to defy mortal aspirations. Quite the contrary, in fact. I was able to go from square one to a working configuration in about half an hour, with a little help.

Using udev, my USB devices can finally have predictable names, regardless of the order in which I plug them in. This in turn means that my fstab entries regarding removable devices and their respective filesystems can finally be something more than a laughable exercise in starry-eyed optimism.

Perhaps I will butt up against, and curse, udev’s limitations in short order, but for the time being, it’s a pure delight to use.

Gentoo 2005.0

Gentoo Linux 2005.0 has been released. Of course, the beauty of Gentoo is that nearly everyone who’s already using it couldn’t care less — they’re kept current by the magic of Portage.

Still, the Gentoo install CD doubles as an amazingly versatile rescue disc, not to mention makes a dandy temporary-terminal boot disc, for those times when you don’t want the full glory (and overhead) of Knoppix.

If Gentoo and Knoppix don’t constitute Exhibits A and B as to why P2P applications like BitTorrent are not merely legitimate, but insanely useful, I don’t know what does.

Gentlemen, Be (Properly) Seated

A little over a week ago, avestriel, my gateway box, suddenly began losing its mind.

The first symptom was the apparently-spontaneous corruption of a Cyrus database, resulting in an inability to recieve new mail and the spewing of approximately 1 GB of data into /var/log/messages in the space of a few hours. (Oops. Suddenly, putting /var/log on a separate partition, or quota-limiting it, doesn’t seem as ragingly paranoid as it once did.)

This was concomitant with corruption of the filesystem itself, requiring me to boot from an installation CD and give myself a crash course in the use of reiserfstools. Two hours of nailbiting later, the filesystem was apparently recovered fully. Score a few more points for Hans Reiser. I rebooted back into the OS, and all was seemingly well.

I built smartmontools, which reported a single SMART error, but one which could credibly have resulted from host-side problems, and nothing that indicated imminent mechanical drive death. The system’s overall problems proved persistent, however: random and irreproducible segmentation faults while building packages, further corruption of Cyrus data, and the occasional outright lockup.

This was distressing, to say the least, on two fronts: first, avestriel had been performing flawlessly since I built it, a year and a half ago; second, partly because of that, I’d come to rely on it for a great deal of my communication with the outside world: e-mail and telephony, in addition to mundane web browsing and SSH’ing to work.

On Sunday, having grown tired of crossing my fingers and hoping for the best every time I rebooted, and thinking that the random segfaults hinted at memory problems, I pulled all three 256-MB DIMMs, replacing them with a single 256-MB unit.

Today’s Thursday, and I’ve observed no problems with avestriel since. (This could simply mean that they’ve become crafty and are hiding, but I suspect not.) The conclusion, then, would appear obvious: bad memory, no?

Well, not quite. Because I promptly shoved the memory I’d just yanked from avestriel into another box, behemoth, and booted Memtest86+. That RAM has spent the last four days enduring a mind-numbingly repetetive succession of all the pattern-writes and -reads that could be thrown at it, so far without a single bit error.

Tentative conclusion: whack-ass electrical-contact problems. I’ll see what happens when I clean the pads and re-seat the original memory, although I may not do that until avestriel is relieved from its current, crucial post as intermediary between me and the outside world.

Things I learned from this experience:

  1. GNU ls, when passed the --si flag, knows how to display a file size in petabytes. I really didn’t expect to learn that for a few more years. (Filesystem corruption is an amazing thing, I tell you.)
  2. A servicable way of recovering a corrupted Cyrus <user>.seen file is to use cvt_cyrusdb to convert it from skiplist to flat format and back again.
  3. It’s very important to make sure that said files are owned by user cyrus and group mail when you’re done with them.
  4. I really need to back up /home, /etc, and parts of /var on avestriel, like, yesterday.

A few people have wondered about avestriel’s name. All I can say is that the case I built it into is a bright, fire-engine red. (And its successor, ambriel, will be bright red, too, even though bright-yellow-and-powder-blue might be a more appropriate combination, given its namesake.)

Playlists!

Now that I’m finally trying to drag my ass to the gym on a semi-regular basis, it’s become imperative that I figure out how to get playlists working properly on my iRiver H120. (Nothing quite throws you off your stride like a sudden shuffle from The Crystal Method into Vivaldi.) Initial results from perusal of the H120 documentation are promising:

  • The H120 understands M3U format only.
  • You flip the player into playlist mode by tapping the A->B button while it’s stopped.

Naturally, however, there are complications. For one thing, the M3U “standard”, if such a thing can be said to exist, doesn’t specify a path separator, so the dreaded “backslash vs. slash” issue inevitably rears its ugly head. The H120 requires backslashes. BMP, the media player I currently use on my work desktop, requires slashes.

Oh, well. I had already resolved to write a script that would periodically index my music collection and build playlists. Now I’ll just have to have it build them twice, once in each format. So it goes. (Perhaps I won’t have to reinvent this particular wheel. Some of these problems, at least, have already been encountered and solved.)

Once that’s done, I’ll see about building a database so that I can listen by genre.