Operating Systems Should Not Be This Frustrating

willfe's picture

Today I spent a bunch of time, probably about 12 hours in all given the assorted screwups Windows tossed my way, putting an ailing computer back together for my friends. It’s a family PC, used predominantly by one family member with occasional use from the others. The installation of Windows XP on it had finally taken enough “damage” that it wouldn’t even boot anymore.

Round One

The first plan was a fairly simple one:

  • Install Windows XP again somewhere else on the existing filesystem, out of harm’s way, preserving all previous data (documents, pictures, music, etc.) while providing a fresh new installation.

There’s a reason (a completely shitty one, but a reason nonetheless) Microsoft advises people not to ever bother trying to install Windows XP on anything but a pristine, virgin, blank hard disk: Windows XP crashes and burns horribly if there’s any remnant of a previous incarnation of itself on a disk.

I want to know … nay, I demand to know … how exactly an operating system was constructed like this so that it actually ignores files and data that come along on its own installation to purposely load/use/honor old, very likely broken settings, when it’s explicitly told to install in a new location.

While the reasoning behind a user’s old My Documents folder being inaccessible is at least feasible (it’s still seriously stupid that the default account on a Windows XP Home Edition install doesn’t necessarily have permission to read files created by the default account from a previous installation), it is absolutely and astoundingly idiotic that Windows XP, installed in a location like, say, C:\WINXP, would spontaneously decide “nope, I’m gonna ignore the shiny new registry hive I got installed with, but only for a few settings, mind you, and dig instead into the one I think is in C:\WINDOWS instead.”

Think I’m exaggerating? Here’s what happened:

  • Booted the computer from CD, to start the installer. This takes nearly 3 minutes.
  • Told it to ignore the existing installation, and install a new copy of Windows XP on a new path on the existing filesystem (no reformat/no delete).
  • It warned me that a pre-existing installation was present, and that it would be deleted if I continued. I continued. I watched it delete lots of stuff out of C:\WINDOWS, and install new stuff into C:\WINXP.
  • It rebooted, asked me the usual staple of questions, and finished the installation.
  • It rebooted again and presented its “welcome” crap. It also immediately bugged me to “activate” it, which, since this was using a valid key purchased with the computer, worked fine (my first positive experience with Microsoft’s increasingly irritating anti-piracy nonsense).
  • The installer didn’t have drivers for the computer’s network card, video card, motherboard, USB controller, or modem. Fortunately, I had those, and got them installed without incident.
  • I immediately ran Windows Update, which immediately installed Microsoft Update.
  • Microsoft Update installed two dozen patches, then insisted on rebooting the machine.
  • It rebooted again. Microsoft Update installed more patches (a handful this time), and insisted on a reboot.
  • It rebooted again. Microsoft Update dropped the bombshell: “You need Service Pack 2 now.” May I take this opportunity to point out how stupid it is to ship a 200+ megabyte update to your operating system that requires you to install tons of patches before you can even install it?!?! What happened to the idea of rolling up all the patches to date in these stupid service packs? At 266MB total (for the offline updater) compressed, this implies that over half the content on the original CD distribution of the OS is being replaced … since you’re shipping that much anyway, why does the stupid thing need to be patched first before it can be gutted and replaced again?
  • Service Pack 2 downloaded (that took an hour … ugh) and started to install. Nearly at the end of the process, it casually announced “Access is Denied,” gave no other indications of what it was trying to do, where, or what had denied access in the first place. Then it tried to roll back the whole service pack installation, and that failed too — somehow it had not only screwed up its own installation, but had managed to hose its own access to make the necessary changes to roll things back.
  • It rebooted again, and blue-screened. Safe mode didn’t even make it to a blue screen — it barfed nearly instantly at what I believe was the PCI driver. Modern PCs don’t run (for long) without one of those, so naturally it died.

Round Two

This round didn’t last long. The new theory:

  • Run a “repair installation” on the now-broken, now-in-between-service-packs installation, to see if it can at least be restored to a mostly-installed state.

Well, it couldn’t:

  • The text-mode installer worked. The machine rebooted.
  • Upon trying to boot into the GUI portion of the installer, it immediately blue-screened. Damned thing.

Round Three

This took awhile, mostly because 802.11b is slow and there was 300MB of data to back up over wireless. However, this round went flawlessly. It went flawlessly because it fucking involved Linux. The plan was, of course, being revised. This time:

  • Back up the important data stored on the machine, using Linux which doesn’t suffer from the many, many stability problems and general doses of insanity that Windows XP suffers.
  • Wipe the entire damned disk clean, and reinstall from scratch.
  • Restore the backed-up data.

Four hours into the project at this point, by the way.

  • I booted Kubuntu. While it did take about 5 minutes to get from power-up to a usable graphical environment, that’s what I actually had — a networked, graphical interface ready to run and do actual productive things. I had to do nothing whatsoever to get the machine on the network — a feat Windows XP needed help to accomplish. Sound, USB, and other peripheral devices were also online and ready for use.
  • I mounted the NTFS filesystem. No magic here, just one command. No irritating “access denied” bullshit either — on Linux, root means fucking root, and root gets to do what s/he wants.
  • Because both secure shell (SSH) and rsync were available and working out of the box, it was a trivial matter to rsync the data that needed backing up across to my notebook. The wireless there was on the slow side (12mbit/sec at best, meaning about 150KB/sec or so at best), but it got the job done.

Pay attention here, and read that again if you need to. It took one try to get this thing up and running on Linux to back up shit that even Windows XP itself couldn’t (or wouldn’t) access, for backups or for any other purpose. Also, even though the initial boot was a bit long (5 minutes … yuck), it brought everything with it. It’s a “Live CD,” meaning you can use it as if it were installed. I didn’t have a lame-duck “installer” running … I had the full-fledged operating system purring like a kitten, all from a CD, all auto-detected, and all “just working.”

Round Four

By now I’d had a refreshing dose of Linux happiness to remind me that yes, computers can actually work right. With the data safely backed up on a computer that was actually being friendly with me (not like that, you perverts Smiling), it was time to clean the slate:

  • Wipe the disk, reinstall from scratch, restore backed-up data.

I’m pleased to report that, eventually, this process did result in a “functional” Windows XP-based computer sitting on their desk ready for use. It still took eight fucking hours. Here’s why:

  • Booted machine from CD. Another 3 minute wait.
  • Gave the OK to wipe the whole disk and format it anew.
  • Waited for that format to actually take place, then wait longer for the text-mode installer to copy enough of Windows’ skeleton to the hard disk that its graphical installer could run.
  • The machine rebooted, and kicked off the graphical installer, which completed the installation without incident.
  • The machine rebooted again, and presented the desktop. Immediately, the machine began bugging me to activate Windows XP.
  • As before, no network, video, sound, modem, or USB drivers, so these got installed first.
  • Jumped through the activation hoops again. As before, this was actually well-behaved.
  • Ran Windows Update, which immediately wanted to install Microsoft Update. Installed it.
  • Microsoft Update wanted to install the two-dozen patches again. Let it do its thing.
  • The machine rebooted. Another Microsoft Update installed five or so patches, requiring another reboot.
  • The machine rebooted. Microsoft Update casually announces it wants to download and install the mighty Service Pack 2. This time, since I’d been downloading it for the last two fucking hours with my notebook anyway, I said “piss off,” closed the browser, and installed Service Pack 2 with the offline installer. Service Pack 2 installed without incident, but wanted a reboot (naturally). As the installer decompressed and ran, I set the machine off on the task of setting the “Compressed” bit to “true” for all files on the disk … there’s a delicate balance here and getting compression enabled (and compressing every file on the disk) now saves time later because there are fewer files to compress all at once at this point. The installer and the compressor finished at around the same time. No problems.
  • The machine rebooted. The obnoxious “beat them over the head with our ‘security efforts’” warning system shipped with Service Pack 2 kicked on immediately, warning me that no anti-virus system was installed. I updated the system settings to stop bitching about it, because otherwise I’d be seeing that damned balloon a whole bunch more before the night was through.
  • Microsoft Update now wanted to download seventy three new fucking patches. This actually took longer to download and install than the service pack did. Internet Explorer 7 also shipped with this bundle of updates (and it was one of those “stub installers” — just smart enough to download the huge, actual installer, which meant yet more downloading). Wanna guess whether the machine wanted a reboot after this? Heh. Didn’t think you did — of course it wanted a reboot.
  • The machine rebooted. Microsoft Update now wanted to download five more patches. One was a driver update. Installed ‘em all, and naturally … say it with me now, another reboot.
  • The machine rebooted. Microsoft Update had another damned patch to download and install. Argh! To my surprise, this one patch didn’t need a reboot. Yay!
  • Time to install an anti-virus tool (I went with Avast). This, of course, requires a reboot when it’s done.
  • The machine rebooted. A quick check with the “Security Center” showed two greens and a yellow (automatic updates weren’t turned on yet but it was happy about its firewall and anti-virus state now). Avast auto-downloaded its program and data updates, and needed another reboot afterwards.
  • The machine rebooted. I installed Firefox from CD, which took all of thirty seconds, and added a few addons to it, which took another two minutes or so all told. No reboots. Heh. Then came AdAware, a defragmenter, and some other assorted tools, all of which installed with no reboots required. I left the machine downloading an update (heh!) for Adobe Photoshop and running a defragmentation of the new disk.

Aftermath

Twelve hours after the ordeal started, my friends finally had a (mostly) usable system again. Overnight it’ll finish downloading the last of its updates and defragmenting its disk, so they’ll be able to start loading applications on it tomorrow and putting it to real, actual use.

It took eight hours and ten reboots to get that machine from “bare metal” to fully-patched Windows XP. That is obscene, and sickening. Also, after those eight hours, the disk was 49% fragmented. It was a 160GB disk, folks, and it had less than 4GB of data on it, yet almost half the files on the disk were fragmented. How the fuck does that happen on a supposedly “production-ready” product (NTFS)?

Just this instant, I started the online defragmenter for my Linux box (running XFS). Low fragmentation (and the volumes are all pretty full, 250GB each, at least three of those, and probably more (I forget and I’m lazy enough that I’m not looking it up right now Smiling)). I’ll note in the text here as we go along when it finishes. I suspect it’ll be in just a minute here.

Eight hours of installing from CD, downloading and installing patches, and rebooting the machine a total of ten fucking times to get it up to Microsoft’s current “standard” platform.

By comparison, I can routinely (and in a repeatable fashion) install Ubuntu Linux (a Debian variant) in under 15 minutes from a CD, have patches for the system downloaded (depending on bandwidth — I’ll use the same bandwidth as was available for this Windows install today for this comparison) in about 45 minutes, and installed in about 10. And the Ubuntu install requires two startups: one boot from CD, and a reboot to bring the main system online. That’s it.

And somehow, even though there may be over a thousand packages to be updated, they each install nearly instantly and seamlessly, so the whole process takes about ten minutes once the download is finished.

I truly don’t get just how Microsoft screwed up their patch system so badly. Ubuntu (Debian) is doing exactly the same basic thing “Microsoft Update” is doing — analyze the current system’s installed files, compare it to the list of new stuff available, download everything that’s changed, unpack and install each archive, running pre-install or post-install scripts as necessary.

Microsoft Update downloads every package it decides it has to download, all at once. So does Ubuntu’s “apt”. Then once they’re all downloaded, Microsoft Update installs each package one-by-one, just like “apt” does.

They both also perform checksum validations on each downloaded file to make sure each one came down the pipe correctly. They both fail gracelessly (Microsoft Update throws an error dialog and forces a browser reload; apt just throws an error and exits back to the command prompt) when a file doesn’t match what was expected.

Why does Microsoft Update take so much damned longer to download each file, though? Apt just tears through the list of every file it needs to suck down, immediately starting each transfer as soon as the previous one finishes. Hell, it uses KeepAlive requests to avoid the overhead of opening and closing connections to the web server hosting the files every time it finishes a file.

Microsoft Update, though, puts on quite a show for every single individual patch it snarfs down:

  • “Preparing for download”
  • Downloading the actual data
  • “Verifying the download”

What preparation is actually necessary? Grab the filename and URI from the server and fucking fetch it! Maybe check disk space beforehand to make sure you’ve got room for the archive. That’s one API call (ask the OS for free disk space available on the path you’re using for temporary storage) and a comparison between two 32-bit unsigned integers (for size), if that. Don’t bother reminding me about 64-bit unsigned integers on 64-bit platforms or systems with big disks (over 136GB if memory serves) — they seem to screw up enough in 32-bit land without stacking another pile of bits on their brainpans.

I also don’t know how they managed to slow down the “verification” process either — you’ve been downloading the damned file, so presumably you could be creating a checksum value as you store pieces of it to disk. Or you could just write it, then read it back from start to finish to generate an MD5 checksum. For even a 90MB file, that should still only take like 6 seconds on a modern system that can read at 20MB/sec off a single disk (gotta include overhead for MD5 checksum calculations).

Somehow apt manages to pull off this check in nearly instantaneous fashion, and does no “preparation” work either. Oh, and even the process of figuring out what to download/update runs much faster with apt than it does in Microsoft Update.

How the hell did Microsoft make this stuff this damned slow? I brought my notebook along today so I could get some of my own work done (not much to do but twiddle your thumbs during those long downloads), but imagine being an IT worker whose job is to rebuild PCs.

The modern corporate IT department does this stuff just once, then they build images of the finished system and deploy that … it takes less time to dump a full disk image to a system than it does to jump through these reinstall hoops all the time. Of course, with Windows XP checking unique volume and system IDs, even with volume licensing, it still bitches if the images aren’t restored just right. And each system ultimately still ends up responsible for its own patches and updates, and is at the mercy of its individual user for getting them installed.

You can do this with Linux, too, of course — it just takes a lot less time. Boot straight over the network if the hardware supports it, or from CD if not; partition the drive, write new filesystems (the newbies call this “formatting”), unpack a tarball (as root) made from the system you built a bit ago, write the bootloader down onto the disk, and reboot. Up you go.

What’s the difference? Hand me a pair of identical, bare-metal PCs with nothing on their disks. Hand me a Windows XP installation CD and an Ubuntu Linux installation CD. In under half an hour, I’ll have a working, stable, up-to-date, patched, ready-to-use workstation up and running with Ubuntu. The Windows installer will still be fucking installing the base system. For the next seven hours, while the Linux box is busying itself with silly tasks like, oh, doing actual work for its user, who is already using the workstation as usual, the Windows box will still be downloading and installing updates. It will still be vulnerable to viral infections until it is protected by a resident scanner. It will still be susceptible to adware and spyware until a resident scanner is installed, along with a competent web browser (like Firefox) that doesn’t just let them all in.

I understand lots of people are tied to Windows because it’s what their employer uses and it’s what their employer makes them use. It’s what people are used to.

People, trust me. Your computers do not have to suck like they do. It’s the operating system they’re running that makes them fragile, flaky pieces of steaming crap, not the equipment.

Final Note

My desktop just finished defragmenting two 250GB disks, an 80GB disk, and a 120GB disk, in under twenty minutes. My desktop is over five years old, consists of two Pentium 3 1GHz chips, and running a mixture of old and new disks. The 250s are brand new, the 120 is fairly new, and the 80 is growing gray whiskers.

Fragmentation never went above 5%.

Windows fanbois love to complain that in Unix (Linux included), everything is a file. And this is true — a Windows installation may have over 100,000 individual files, while a Linux installation will drop upwards of 500,000 or more files onto the disk for its operation.

How is it, then, that a system this old, with well over a million files (hey, I’m a busy guy), never gets more than 4 or 5% fragmented over years of use, while a freshly installed Windows XP system can generate a filesystem with nearly 50% of its files fragmented?

Don’t mistake this rant for a complaint about the time I spent today, either — I spent it with good, dear friends and had a lot of fun talking/watching Family Guy/Simpsons/American Dad with them.

And finally, please go download Ubuntu Linux and give it a try. You can download it (legally) for free, burn the image to a CD, and boot it to try it out without even installing it on your computer. Note how responsive it is, then realize that whole thing is running entirely from CD. Imagine how fast it would be on the hard disk in your computer. Back up your data from Windows (to an external drive, CDs, tape, network, anything), and install Linux instead. After a day or two of learning how to get around and do your daily work with it, you’ll never even look back. I promise.

Any sufficiently advanced technology is indistinguishable from a rigged demo.
— Andy Finkel, computer guy

Note that Bill Gates hasn’t had a successful “rigged demo” since Windows 95 — both Windows 98 and Vista choked on him during keynote speeches and demos. Heh.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.
  • You can use Markdown syntax to format and style the text.
CAPTCHA
This question is here to test whether you are a human visitor and to prevent automated spam submissions.
9 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.