All posts by larye

Larye has been messing around with computers for 50 years. After getting his own computer after 20 years of systems and hardware engineering at Univac, he was unhappy with "that program loader from Microsoft," DOS. He was even more unhappy with the "bag on the side of a kludge" that was Windows 2.0. Dumping both, he has been a happy Unix user ever since 1990, a professional Unix systems administrator since 1996, and a bioinformatics programmer since 2001. He has been developing web sites and applications since 1998. When he can pry his fingers off the keyboard, he can be found riding his bike, making quilts, weaving, or building airplanes.

The Machine Stops: keeping up with maintenance

The title of this article is taken from a 1909 science fiction novella by E. M. Forster, better known for his novel “A Passage To India.” In the early sci-fi story, humanity has somehow ruined the environment and is forced to build underground, where automation has brought about a Utopian age where no one wants for anything.  Except, in this pampered world, society has forgotten how the technology works, and when it breaks down, “civilization” ends.  Hence, the subtitle: keeping up with maintenance, something we fear is becoming a lost art in the age of throw-away planned obsolescence, but something we need to do to survive the recession and age gracefully while still doing the things we love to do, which, at present, don’t involve being pampered and sedentary.

Today, we are on Vancouver Island, BC, Canada, planning a few days of bike riding on the popular rail-trails around Victoria, despite predictions of cold winds and occasional rain.  Our steed for the occasion is “Leviathan,” a 1986 Santana Arriva XC mountain-bike-style tandem, which first rolled onto these shores in September 1986, when we rode one of the American Lung Association’s first Tri-Island Trek fund-raising rides.  The old bike has been through a lot in the 24 years since then, countless sets of tires, new rims, several sets of chains, a set of chain rings, a freewheel cluster, several sets of pedals, and had fenders and bar-end grips added.  But, somehow, we expect it to just keep running.

Lately, we have been thinking about a new bike: “Leviathan” is heavy and slow, and, at nearly eight feet in length, not feasible to take on public transit, except ferries, without complete disassembly, and sometimes not then.     The bike still works, though we worry about touring, since most of the parts that are prone to wear out have not been manufactured for nearly 20 years and are hard to find.   On the other hand, we’re not getting any younger, ourselves.  This bike has served us well for over 20 years, are we going to get as much use out of a new one?  Probably not, since I will be 90 by the time any replacement has served that long.  There are a few folks out there, touring into their late 80s, but it’s been a hard winter for aging aches and pains and we don’t have any illusions about living fit forever.

This has always been a problem of aging: we become accustomed to the familiar.  New is no longer exciting; we take comfort in that old pair of boots, that old jacket, despite a touch of mildew here and a rip there.  Cars and bikes become old friends, and they age with us.  Just as we adapt to creaky knees, thinning and graying hair, and a few aches, we overlook the peeling paint, the window that won’t roll down all the way, or a bit of chain skip.  In retirement or planning for retirement, we become more and more reluctant to invest in new things we might not wear out, and we have less and less discretionary income to indulge in new things for the sake of slight improvements.    And, let’s face it–our modern machineries are better than the old ones:  because they aren’t meant to be overhauled, but replaced after a year or two, they are made reliable enough to run trouble-free for that “market life,”  so much so, that they will often last five to ten times longer before becoming completely unusable.

So, us old folks hang on to those obsolete items until replacing them becomes both sticker shock (a new tandem of equal quality is twice the price of the old one) and a huge learning curve from new technology (a bike we test-rode a couple years ago had brake-lever shifters, something I had never heard of and which weren’t intuitive, resulting in a less-than-enjoyable test ride).  But, those old items that have lasted so long risk sudden and final failure– since they aren’t meant to be overhauled and parts may not be available–or  gradually become impaired so they are no longer safe to use.

Just a few days ago, I was doing some practice rides on “Rocky,” my old faithful commuter bike that has carried me through several rainy seasons in Seattle and ten years of Montana winters, when I noticed the left pedal had a lot of play in it.  Being of a certain age, and a member of the “old school,” I took it apart (it clearly wasn’t meant to be disassembled–the “dust cap” had no designed-in means of removal, but I improvised), put the bearings back in the races and adjusted the cones, then took a 15-mile ride, by the end of which the pedal had nearly seized up.  I remember doing the same thing to one of Judy’s pedals when riding the San Juan Islands many years ago, but that was on the first set of pedals on “Leviathan,” and they had screw-on dust caps and easily-adjusted cones, so I was able to repair them well enough to get us home, though the races were scored and the pedals had to be replaced.   This time, I hesitated, because this bike is 14 years old, has been abused, left out in the rain, and had most everything replaced on it at least once.  I’m no longer commuting to work (the Internet is my office now), so, do I need this bike?  Do I need to replace it?   I looked through the glass at one of the new carbon-fiber road machines at an upscale bike shop in Olympia, still dreaming–40 years too late–of 22-mph time trial runs, but in the end, I ordered a new set of pedals, the third set for this bike.  It’s not fast–it’s a hard-tail, no-shocks mountain bike that I don’t ride in the mountains and it’s too slow for road riding, but I’ve ridden my “birthday miles” on it the last two years anyway, and might for many more.  A five- or ten-pound lighter bike is not going to take 30 years off the rider.

These thoughts linger with us as we prepare to head out on the trail this morning: we aren’t as strong as we were the last time through here and we have slower reaction times.  The bike is just as heavy as it once was, a couple years older than on the last long ride, and a few hundred miles further from its last tune-up.  We’ve been busy, focussed on other aspects of our lives.  Are we ready?  Will the machine stop?  Will we be capable of seeing that end coming in time to act?   Meanwhile, our 16-year-old Jeep was making protest noises while inching onto the ferry today; it, too, has its issues: cracked windshield, windows that don’t roll down, leaky weatherstripping, missing and broken door stops, peeling paint.  Maybe the bike will get us home if the car doesn’t.  If only the rusty bolts on the bike rack don’t give out on the way home.

Blog Trash – The Most Insincere Form of Flattery

Being rather new to the Blogosphere, I was amazed at the flood of comments presented for my approval on the most insignificant postings.   Before I started my blog, I thought that, of the millions of blogs out there, it would just disappear into cyberspace, only to be seen by a few faithful friends, and then only when prompted.  But, there they were, in my inbox, “Comment waiting approval…”

But wait, the comments are too generic–“This is a great blog”–or, just plain inappropriate–“Short and to the point,” when mine tend to be wordy and drift off-topic.  And, they each come with a URL of the poster that leads back to a strange and disjointed blog.  Hmm, I see a pattern here.   A bit more research shows that these blogs seem to be a  list of keywords or keyword-rich cut and paste from dozens of other blogs and websites.

I’ve been studying Search Engine Optimization (SEO) techniques lately, for a project I’m working on, and these chaotic blogs seem to be exactly what the SEO experts say not to do if you want to get search ratings.  They are attempts by the owners to get high search engine rankings for the keywords, so as to draw traffic to one or more links on the page.  I suspect these trash blogs might be the handiwork of the many fly-by-night SPAM factories that promise to get you good search ratings.  My advice is, don’t approve comments of this type–they can only damage your own search ratings.   One comment URL I reviewed led back to a website that, on the surface, appeared to be a directory for academic papers on specific topics.  But, scrolling further down the page revealed a rather large pornography index.  Delete!  Linking this sort of thing could not only destroy your ratings, but get your website blocked by association.

My advice is, if a comment to your blog appears to be flattering, but generic, just trash it.  And never, never respond to SPAM offers for SEO for your website.  If you want to get better ratings, be careful of who you link to.

Backups Matter

Having been a Unix systems administrator for about 20 years and “in the IT business” for more than twice that time, I have always been aware that that tedious task of backing up your data can pay off in the end.  As we say, there are two types of computer users:  those who have lost valuable data and those who will lose valuable data.  But, backups can help.

The other day, while between crises at Chaos Central, our home/office/workshop, I was browsing through the web statistics for our public sites and actually paid attention to the list of ‘404’ (File Not Found) errors.  Now, a lot of these are the usual and customary web site attacks that go on all the time, “bad guys” probing for security holes that a) don’t exist because we are not using Microsoft Internet Information Server, or b) have long since been plugged in Apache, so I more or less ignore those, along with the blind probes for informational pages to gather email data to feed SPAMmer’s address lists.  But, since I have been using Google’s Webmaster Tools to aid in Search Engine Optimization (SEO) for my clients,  I’ve paid a bit more attention to little things, like having a ‘robots.txt’ file even if I don’t have any pages I want to hide from the search spiders.  Another one is the ‘favicon.ico’ file:  you don’t need one, but browsers always ask, so it is nice to have one.  Besides, it adds a distinctive icon to the address bar, tab, or ‘favorites’ list, so I have been creating those tiny graphics and adding them to sites as well.

But, this time, I also noticed missing pages where there shouldn’t have been any.  Oh-oh.  Until sometime last year, we had a number of links from our public server pages to our ‘extranet’ server located in our home office and port-mapped to our external router.   Some issues with our Internet service at home and our impending move made it imperative to move these pages onto our public servers, which I more or less did, in bulk, to a virtual server, and changed all the links to point to the new location.  I had thought I had tested all of the links, but here we were, many months after the transition, with a broken link.  An entire page and all of its images, gone.

Meanwhile, the old extranet computer had not survived the household move.  After sitting in a cold, damp basement for a month or so last fall, it refused to start.  But, we still have the last set of backups!  So, I extracted the files from the backup archive and uploaded them to the web site.

For the record, we are, of course, a Unix shop, running mostly Solaris and Linux, so we use Amanda, the open-source backup system from the University of Maryland, and backup to virtual tape on cheap USB drives.  The drives are large enough to keep several weeks’ worth of backups, and we archive the last backup set from “retired” machines.  For machines like my Linux laptop, that aren’t necessarily on or even in the network 100% of the time, I use rsync, freezing a checkpoint now and then, since we do upgrade Ubuntu versions, and we keep a pre-upgrade backup as well as current ones.  Because the Amanda backup runs daily, but we do a lot of work during the day, we also keep a snapshot backup (using rsync) every couple of hours during the workday on our main server/workstation.  For our one seldom-used physical Windows machine, we simply copy our working directories onto a file share on one of the Unix systems.

So, there are many ways to do backups, but it is important to do at least one of them, whether or not it seems to be a pain–it will pay off.  Oh, yes, I am in the group of users who have lost data–in my case,  I archived data, then failed to make a second copy before the orginal archive failed.  And, just because I’ve lost data once, doesn’t mean I won’t again, backups or no backups.  But, keeping good and current backups does reduce the chances that it will be soon or extensive.

Parking Meters are Evil

Yesterday, my tandem bike stoker (and life partner of the past 25 years) and I headed to the Big City by automobile to  run a few errands and check out the bike-path/walking trails around Capitol Lake.

Since the day had started cold and threatened to turn wet, we parked at metered parking on the downtown side of the lake, rather than out on the parkway on the far side of the lake.  Standing in the cold breeze from the lake and looking at the rain-laden clouds sweeping in from the Coast, and, with the closed-for-repairs causeway less than 500 meters down the shore, I thumbed enough of our dwindling supply of nickels into the meter for what seemed to be a generous 40 minutes of brisk walking.

As we  moved into the lee side of the hill on which Washington’s Capitol campus sits, the wind didn’t seem so cold, and we noted a switchback trail leading to the Capitol, so we diverted.  In the 30 years since I first came to Washington State,  I had never been to the Capitol itself, so it seemed like a good idea at the time to check it out.  After reaching the top and strolling past the domed seat of government, we noted that we only had eight minutes to get back to the car before the meter expired.

It wasn’t far as the raven flies, but ravens don’t walk down switchbacks, and the eight minutes expired by the time we reached the lake shore, where we noted, in the distance, the flashing red light of the  Parking Enforcement vehicle as it moved down the street–away from our car.  One more nickel would have saved us:  the time stamp on the $15.00 parking infraction was three minutes after the meter expired.  Officer Lisa must have sat in front of the car waiting for the LCD to flash all zips.  The car next to us also had a ticket, so it was obviously a good place to just hang out and watch the meters tick.

Needless to say, the afternoon gloom intensified inside the car as well as out on the drive home.   Parking meters are evil: you can’t add more time unless you are physically there, and they don’t record how long the meter has been expired, or know if the same car has been in the spot for more than the 3-hour limit.  In some municipalities, the parking enforcement folks make more than one pass to check for deliberate violators.  Obviously, there is no “grace period” in Olympia, especially during the legislative session when parking space is at a premium.

So, the moral of this story is:  be generous with your supply of nickels at the meter–if you return on time, pass your good fortune on to the next car, or consider it a tip to the city for having a convenient spot for you to have parked in.  Or, bring your bike and park the car in a free lot outside the city core.  Next time, we will.

Why We Don’t Use Windows (if we can avoid it) #537

Some software vendors haven’t caught on yet, and still make applications that run under Windows only.  Unfortunately for us, some of those apps are “must have,” so we still have to have at least one working copy of Windows around.  Our current one is a refurbed off-lease IBM desktop we picked up a few years ago, running XP.  It’s been up and running lately, but doesn’t do much other than installing so-called security updates from time to time.

We had left it alone for a couple of weeks while busy with other projects.  Today,  I tickled it a bit to wake it up, and, when the “select user” screen appeared, clicked on my username.  The machine whirred a bit, then promptly announced I was being logged out.  OK, idiosyncratic behavior sometimes happens, so I try again.  Same thing.  Different user, same thing.  Hmm.  Maybe something got corrupted, boot to Safe Mode.  Same thing…  Can’t logon, even as administrator (it’s XP Home, so, no difference, really).  Oh-oh.  We did have some fairly important stuff on this machine.  Not good.

So, off to the Web on one of our trusty Linux boxes, symptoms indicate the C:\\WINDOWS\system32\userinit.exe file is, what?  Missing?  How can that happen?  This is a vital system file in the middle of one of the most holy of holies in the whole operating system.  But, I rummage through my files and drag out the Ubuntu 9.10 CD I used to upgrade my laptop a couple weeks ago (which had it’s own issues with wireless drivers, but nothing like casually losing an essential file after running for three or four years).

I boot the “live CD” version of Ubuntu 9.10, mount the Windows partition, and, sure enough, no userinit.exe file.  Everything else seems to be there, so I boot up a newly-installed  XP virtual machine running under VirtualBox on our 64-bit Linux box–to which I was planning to migrate our Windows “have to” apps.  I upload the missing file to my Linux account using pscp.exe, then pull it over to the broken XP installation with scp, using the live-CD session.   Next, reboot to Windows XP, and voila! it comes up normally.

Going back over the long tech forum trail, I find that this is a not-uncommon event with XP, and, if you only have Windows to work with, is painful if not nearly impossible to recover from, usually involving extracting the file from an OEM CD.  We do have one (which is where our Virtual-Box installation came from), but it was much easier to do the deed by booting Linux.  Besides, taking the file from a running XP installation ensures it is the latest version–there is always that issue when restoring from the original CD.  Windows doesn’t have packages with dependency checking like Linux and other Unix-like systems do, so it would be easy to get out-of-spec by doing that.

Next, we did some more detective work to see why something like this would happen in the first place.  Now, there isn’t a smoking gun, because these forums are run by and frequented by folks who think that Windows is the only way to compute, and that whatever it does is “normal,” so nobody thinks it is strange that this fatal bug is actually a Stupid Microsoft Trick, used in a feeble attempt to emulate Unix’ system single-user-mode and ‘NOLOGIN’ environment settings, when installing system updates.  It appears that the Windows Updater actually modifies the registry under certain circumstances to perform this trick, and may replace the userinit.exe file.  After all, have you ever wondered how the system does the reboot thing during an update and bypasses the logon entirely?  If you are so unlucky as to try to logon to your machine during this time or–because the automated process may not go quite as smoothly due to network glitches, power events, or whatever–after the update has failed to complete correctly, you are now permanently in zero-user mode, and the file is just plain gone.

Sorry, Microsoft, a lot of us think this is just not the way to run a computer operating system.  Our preferred system architecture is well-thought-out, handles multiple security levels, multiple users, multitasking, and has done so nearly flawlessly for about 40 years, during which time it just gets better.  Yours has been built from a 16-bit port of an 8-bit microprocessor program loader that has been an endless series of compromises and risks to beat the clock and can’t get any better unless the legacy crutches are abandoned once and for all.  No matter how fine you try to close the gap on a race condition, it is still a race condition, and sooner or later, deadlocks happen.  A patched kludge is still a kludge.

Meanwhile, while working on the fix, we quietly backed up the entire hard drive onto one of the Linux servers. so our data is safe.  Now, if we could only persuade the software providers to write their applications in solid code for operating systems it could actually work on safely, and we wouldn’t have to endure these kinds of torments.

Caveat–this worked for me as written, but you might have to modify more files in the system32 directory to get the machine to boot so you can fix the Registry if the logon value for the executable file has been changed.  In my case, the userinit.exe file was just missing, the Registry seems to be normal.  No malicious malware suspected, just a missing file that gets unsafely manipulated by updates–on purpose.