skippy dot net

hives

At work today, I received an update to an application we run. It's always been a well-behaved, stand-alone application, so I thought nothing of installing it. Indeed, the upgrade went smoothly, with only one weird error message popping up to alert me that the uninstall process wasn't finished. The only option was "OK", so I clicked it and the installed kept on installin'. It rebooted Windows XP when it finished. And then Windows XP rebooted. And rebooted. And rebooted.

Ugh.

This very symptom had actually happened to the same PC at the end of last year. I forget now, what the specific circumstances were then, but I knew right away what search terms to feed to the Microsoft Windows XP Support page:

stop registry hive software

In late December I had a chance to review Article 307545, and it didn't fix the problem I had then. Specifically, I was unable to backup C:/Windows/System32/Config/Software, presumably because it was corrupted. Article 307545 doesn't tell you what to do when the recovery console won't let you copy the registry hive ...

I tried again today to follow the steps outlined in the support note. Again, the reovery console refused to copy the Software hive. I tried skipping that one step, hoping perhaps the remainder of the steps would fix my problem. No such luck. I shoe-horned in the emergency registry hives from C:/Windows/Repair and then moved the hives from the System Restore location. I was feeling confident as I rebooted the machine, expecting to get a login screen. Instead, the system rebooted. And rebooted. And rebooted. All that work to get right back to where I started.

I realized today, in a whole new way, that Microsoft Corporation isn't really concerned with where I want to go today. They're concerned with where their shareholders want to go today. I guess I always kind of knew that, but this was a very personal introduction to that reality.

I've been growing more and more accustomed to GNU/Linux configurations and the above scenario is highly unlikely to occur there. You see, configuration items in GNU/Linux are (almost) always stored as plain text files (usually) in /etc. This means that a user can view and edit their contents with a simple text editor. It also means that the configuration files can be transported between systems in a variety of ways and simply dropped into place. Microsoft's non-text registry is far less flexible, and requires Recovery Consoles and other voodoo to manage.

Applications in GNU/Linux usually stick their global configuration items in /etc, and store per-user configuration items in each user's /home directory. So if the /etc partition blows up, the users ought to retain their specific configuration settings. The Windows registry, as an all-encompassing repository for configuration data, presents a single point of failure for system- and user-level configurations. The data is sprinkled (sometimes redundantly) amongst the various registry hives. A corruption of any part of the registry can often spoil an entire system.

And because Windows so deeply depends on the registry for configuration details, recovery of a dead system can sometimes be a lost cause. At best the steps listed in Article 307545 will work, and you get your computer back; at worst you have to re-install your system from scratch, rebuilding configuration details for each application. Contrast this with GNU/Linux, where a LiveCD like KNOPPIX can provide direct access to all of the plain-text configuration files which can be edited as needed. Or, if a re-install of GNU/Linux is necessary, you can backup your /etc items first, and then simply copy them back to re-configure your system.

Microsoft Windows makes it hard for me to diagnose and maintain a system.

GNU/Linux makes it easy for me to diagnose and maintain my system.

skippy

hives was authored by skippy on . This entry has been taggged with the keywords: , and . If you would like to follow the comments on this post, you can subscribe to its Atom feed.

5 Comments

gravatar

On Bob added:

It will be interesting to see what future Windows versions bring. Their .NET Framework, which few Windows applications developers have yet to embrace, but which Web developers have, sidesteps the registry altogether in favor of a "machine within a machine" similar to the JRE. All configuration for .NET applications is held in XML configuration files. .NET components do not have to be registered in the registry, nor do thier configurations. Of course, the .NET framework itself depends upon the Windows OS; it adds a layer, at some performance cost, that allows developers to avoid the traditional "dll hell" problems... None of this really a solution to the problems you expressed, but perhaps it indicates that parties within Microsoft do understand and want to do something about the problem....

However your point is well-taken, that MS' primary interest, like any public company, is to create value for its shareholders, so we can all expect a continual stream of for-pay upgrades and "improvements," many of which will be designed to require additional MS software and MS-certified training. There is no question that Linux is a better mousetrap, particularly from the point of view of IS professionals. What I am interested to see is whether more Linux applications will embrace XML for their configuration files (few do), despite its bloated file sizes (tags to actual config data can be 30:1!). There seems to be growing consensus toward XML, despite the bloat, that I find a little hard to understand...but certainly it's human-readable.

gravatar

On skippy added:

The .NET framework is a great innovation, and will no doubt be an important component of Microsoft's business model for a long time. I can't decide, though, if .NET is another gilded cage in which to lock developers and users, or if it truly represents the (subtle) beginnings of paradigm shift within the company. For example, there is a growing body of open source .NET solutions. Microsoft may, of course, clamp down on these through EULA interpretations or other licensing restrictions.

As for GNU/Linux jumping on the XML bandwagon, I think the trend is leading that way, though not without a lot of grumbling from the old guard. I don't know if GNU/Linux will ever go all-XML for config stoage, since so many people take it for granted that they can grep, sed, awk, cut, and cat plain text files so easily. XML make some of these operations easier, by providing structures to use with regexs for exmaple, but also make some operations more complicated (largely due to bloat).

Many of the "professional" GNU/Linux distributions (Red Hat and SuSE for example) use XML extensively under the hood of their graphical configuration managers (like YAST2). They use an XML version of a particular package's config file to construct modified versions of that config file. The challenge with these is that they're not (yet) smart enough to recognize when a user has manually edited a file. So if you manually modify a config file (say, /etc/samba/smb.conf) and then use the graphical configuration tool to further modify the configuration, your manual change(s) will be lost as the graphical tool reconstitutes the config file from it's "blessed" XML source.

Until the tools get smart enough to accomodate manual modification to config files, I think XML will be a fringe element to core GNU/Linux configurations.

gravatar

On bob added:

Thanks, Skippy. Those links to .NET OSS were really interesting. I was also interested in your comments about XML & YAST; that explains a lot. I have learned the hard way to limit whenever possible to use YAST for my SuSE 9.1 configurations, vs. making edits to the config files. I do think YAST is helpful (at least to me) despite its shortcomings.

gravatar

On skippy added:

My only real concern with "open source .NET" software is that people will focus on "open source" instead of "free software". Free means "freedom matters".

And freedom is inimcal to Microsoft's responsibility to its shareholders.

gravatar

On Brian added:

Actually, the registry is a text file, of sorts. Think of it as the entire /etc directory structure concatanated into a single file. Of course, then they tried to add some database elements to it, so that all of the configuration for a program wasn't all in one place . . . .

But your point about it making the system less stable and more difficult is well taken. Just goes to show you: even on a workstation, you should do a full backup before making any changes ;)

And You Are?
Something to add?