Jul 30, 2008 (02:07 PM EDT)
Rebooting Windows: How To Recover From Vista Crashes
Read the Original Article at InformationWeek
This story originally appeared June 27, 2007.
I've finally got a compliment of technical substance to pay to Windows Vista, beyond the kudos it has justifiably received for the glitzy, Mac-like look and feel it has brought to the PC platform.
The good news is that Vista, for all its annoyances--including slow search and intrusive security warnings--is much more robust and harder to break than any previous Microsoft operating system.
Interestingly, even the infamous "blue screen of death" has largely been thrown onto the software slag heap. (Lock-ups during the installation process are now heralded with a blank black screen!)
Unfortunately, crashes haven't been totally banished. More ominously, because Vista is packed with many more features and takes much longer to install than earlier OSes, when it does fail, you've got a time-consuming crisis on your hands.
Specifically, here's what we're going to discuss in this article:
Vista comes with a backup tool called Complete PC Backup. This allows you to save an image, or a complete, bit-for-bit copy of everything on your hard drive. In the event your set-up becomes terminally screwed up, this is a way to restore some semblance of where you should be (i.e., it will restore your PC to the way it was at the time you copied the image. Unfortunately, that resumé or killer sales presentation you were working on at the moment your computer bombed out will still be lost and gone forever.
There's a little-known restoration process, which you can use to get your system back up to snuff without going through a complete reinstall. It's controlled via a command-line tool called Bootrec, and it's more powerful than ever in terms of repairing nettlesome startup issues.
The third leg of our story discusses a neat tool that's hiding just beneath the surface of Vista. It's called the Reliability Monitor and it keeps a tally of all your Windows crashes, application failures, and hardware problems.
How To Break Vista
I got interested in the subject of crash-recovery after I recently re-read Fred Langa's popular piece, XP's Little-Known Rebuild Command. For the purposes of our crash-recovery discussion, there have been some big changes since the XP days. Mostly, they involve the way Vista handles booting up. The OS no longer uses a boot.ini file. That's been replaced with a sophisticated file-like structure called Boot Configuration Data. (More about that later.)
The upshot is that standard Vista installations are less likely to fail to boot than were standalone Windows 95/95/XP setups. Paradoxically, dual-boot configurations seem more prone to problems, but that'll be the subject of a second article.
Vista also is more resistant to damage to key files. Indeed, my original plan was to retrace Langa's XP path for my Vista article and induce a crash by damaging the crucial "hal.dll" file. Thanks to Vista's improved protections, even though I had admin privileges, I couldn't touch it. (On the other hand, my hal.dll test exposed the achingly slow way search runs in Vista. I found the hal.dll file manually by going to directly C:/Windows/System32, while search was still lumbering along.)
Mostly, the crap-outs you'll face with Vista will involve apps quitting or strange lock ups from which the system seemingly recovers. (I say "seemingly," because in such cases, you're often not really sure whether all your data remains intact.)
Still, there are scenarios under which Vista will break. In what could be a canonical example of Murphy's Law, while Vista will survive numerous, complex software gyrations, one of the simplest command sequences you can think of will take it down completely. Hold down the Windows key and the letter "E" for 20 seconds or so. After opening up Windows Explorer windows ad infinitum, your system will stop responding.
All in all, the realization that, while Vista is unlikely to break, it can break, should make the prudent PC user amenable to the full backup strategy we're going to discuss in the next section.
Backups Unleashed: Complete PC
Amid Vista's hierarchy of tools, one of the least known but most important is Complete PC Backup and Restore. The tool doesn't simply copy all your files -- executables, docs, dlls, and what-not. A backup like that would require you to reinstall and reconfigure everything. Aside from the time and trouble, full reinstalls never return you to the state you were in before your computer universe came crashing down. (For one, all your app option setting return to "default.")
Rather, Complete PC saves a bit-for-bit copy of your hard drive, called an "image." As Windows Help explains it:
A Windows Complete PC Backup image contains copies of your programs, system settings, and files. It is a complete system backup that you can use to restore the contents of your computer if your hard disk or entire computer ever stops working. When you restore your computer from a Windows Complete PC Backup image, it is a complete restoration. You can't choose individual items to restore, and all of your current programs, system settings, and files are replaced.
Interestingly, "image" as used in the context of Complete PC is a slight misnomer. While the tool saves a copy of your hard drive, it doesn't save it as an ISO image file. Rather, Vista stores the state of the C drive in a collection of VHD files. VHD, which stands for Virtual Hard Drive, is a Microsoft-specified format ideal for restoring a drive's original image. (Furthermore, the rudimentary CD-ROM burning software included with the OS doesn't do ISO images. For that, you need a third-party package such as Nero.)
There's one big stumbling block with Complete PC: It isn't included with Vista Home Basic, or Home Premium. (That's one reason I recommend you get Vista Ultimate. Here's Microsoft's overview of the different Vista editions.)
A second rub is that, even within Ultimate, the tool is less accessible than one might expect. I found it to be pretty much hidden. While Vista Help lists Windows Complete PC Restore under its "System Recovery Options," the description tells the user: "For more information, search Help and Support for 'complete PC restore.' "
Worse, when you finally call up the correct Help screen, it provides erroneous instructions. Windows Complete PC Backup is explained on the Help page entitled "Back up your programs, system settings, and files." This instructs you to click open the Backup and Restore Center. However, that center can be found only if you've kept your Vista control panel on the old-fashioned (i.e., Windows XP) "classic" view. So most folks will end up wondering where to go.
But enough nattering about Help. It turns out that saving everything in your system's current state using Windows Complete PC Backup is a fairly innocuous process.
First, go to Control Panel > System and Maintenance > Backup and Restore Center.
Be prepared for a bit of a shocker, though. Complete PC Backup informed me that my backup would require six to 10 DVDs. Considering that that would have eaten up to a third of my $16 carousel of 30 16X DVDs--$5.33 worth, or real money--I was glad to eventually find out that this was a Windows threat, not a promise.
Complete PC Backup runs gracefully, with a few Microsoft flourishes thrown in for good measure. For example, when it prompts me for what I know is a DVD, it says cryptically "Label and insert a blank disk bigger than 1 GB" into drive D. ALEX-PC 6/25/2007 4:01PM 1 Name of machine, date, number of the DVD (You can use CDs, too, though there'll be lots more labeling and inserting involved.)
Creating the backup disks is a mildly time-consuming process. Burning the first disk alone took an almost interminable 27 minutes. The second disk spun for 16 minutes before it was ready to be spat out. Then, incredibly, the third DVD was done after only three minutes, and Complete PC backup was, thankfully, done -- a good three discs earlier than its stated minimum.
Let me restate my strong recommendation that you run Complete PC Backup at your earliest possible convenience. With a new machine, the appropriate backup point would be after you've installed all your apps and ported over your documents, photos, and music files.
A big reason is my looming sense that Murphy's Law applies to Vista more firmly than to earlier Windows incarnations. That is, Vista is less tolerant of hardware glitches, either because its system-monitoring capabilities are beefier than, say, XP, or perhaps because it eats up more of a machine's processing headroom. A case in point: about a month after I built my Vista system, the OS told me my hard drive had gone bad. The "failure" -- an intermittent or soft failure at best, since it wasn't reproducible on another machine -- required that I replace the drive and reinstall Vista. Foolishly, I hadn't prepared my Complete PC Backup DVDs.
A word about installation disks: During the Windows XP era, PC makers mostly moved away from providing such disks to computer buyers and instead included annoying, vendor-specific "recovery" CDs.
I've noticed, since the advent of Vista, that most PC vendors -- Dell, for one -- have returned to the practice of including an installation DVD. That's good, because most of your Vista repairs will proceed much more smoothy with this in your position. As well, I always found the recovery CDs popular during the Windows 95/98/XP era to be pretty much useless; you usually ended up having to do a full reinstall.
Now, back to our program, already in progress.
Here's how to restore your system from your Complete PC Backup DVDs, when you have the Vista installation disk:
1) Insert the installation disc, and then restart your computer.No installation disk? Then restart your computer, press F8. This will get you to an "Advanced Boot Options" menu, from which you can "next" your way to the "Systems Recovery Options" menu. See Step 3 of this Knowledge Base note from Microsoft for more.
When in doubt, if you can't get it to start, reboot, but don't hold down the F8 key; that won't do anything. Instead, repeatedly press "F8" as if you're an impatient person who can't wait for something to happen (which you actually are). This'll get you to the "Advanced Boot Options" menu.
The Little-Known Boot-Repair Command
I know what you're thinking: If I could restart my f&%$#&^ing computer, I wouldn't need no stinkin' backup disks. I realize this is circuitous reasoning, but if you can't get your computer to boot up, then you've got a boot problem.
True, Vista no longer relies heavily on a boot.ini file. (Indeed, it no longer has a boot.ini file) Rather, Vista maintains a sophisticated tally of what it's supposed to load at startup in something called a Boot Configuration Data store. The BCD is more precisely a list of boot options; that list is made up of Boot Configuration Data elements and objects.
It's a vast oversimplification, but when you can't boot up, the problem typically involves a bad BCD store. (At a lower level, your BIOS could have trouble loading and/or the Master Boot Record could be corrupted.)
Of course, most crashes can be solved by a simple restart. However, rarer and serious incidents may corrupt the Boot Configuration Data file and render Vista unstartable. From my research, it appears that most problems like this occur when people have set up, or tried to set up, dual-boot systems.
How do you know there's bad Boot Configuration Data? When you start up and get an error message which reads: "The Windows Boot Configuration Data file is missing required information."
Fortunately, if and when this occurs, Microsoft has a tool to help. With Vista, it's called Bootrec, rather than the Bootcfg moniker used when Langa popularized it for XP. With Vista, the command sequence also is slightly different. However, the ultimate goal is the same: Repair a bad Master Boot Record, boot sector, or BCD store, and get your system to restart normally.
Interestingly, when I typed "Bootrec" into Help, I got "0 results. No matter; the real scoop on its operation is contained in two Microsoft Knowledge Base notes [(LINKS here and here)].
The easiest path to Bootrec repair is to insert your Vista installation disk and fire up your PC. In reality, you might have to start your machine twice, if you can't get the disk into your drive fast enough to get it to boot from the drive. In such a situation, turn on the PC, insert the disk, and then turn the machine off. When you restart it, you're likely to get the message, "Hit any key to boot from CD or DVD." My advice: Hit any key.
You'll now be taken through the sequence I've captured in the accompanying image gallery. After a seemingly interminable delay for Vista to load up from the DVD, things will proceed fairly rapidly. Blow past the first dialog box, clicking "next" as if you planned to actually install Vista anew.
Be more deliberate with the second one, though. It posts up a big "Install now" in the center of the screen, and that's definitely not what you want to do. Instead, look toward the lower left, and click on "Repair your computer."
Finally, we cut to the chase with a dialog which asks us to "Choose a recovery tool." Here I should note that it's recommended that you try start-up repair, system restore, or the Complete PC refresh (discussed above), unless you've specifically received a Boot Configuration Data error message. To proceed with the Bootrec process, click on "command prompt."
At the prompt, enter "Bootrec /RebuildBcd" (without the quote marks). That should be sufficient in most situations. If the tool runs successfully, you'll be asked whether you want to add the entry it's created to the Boot Configuration Data store. Answer "Y" (yes), and then restart the computer.
If "Bootrec /RebuildBcd" gives you no joy, you'll have to proceed to a slightly beefier process involving the removal and subsequent recreation of the BCD store. The required command sequence is:
Bcdedit /export C:\BCD_BackupYou'll get a prompt asking you whether you want to "Add installation to boot list?" Answer "Y" (yes), type exit, then hit shutdown or restart.
In the credit where credit is due department, I didn't come up with this rocket-science myself; it's all in a couple of Microsoft Knowledge Base notes, as was the earlier XP Bootcfg stuff. You should download the notes (here and here) and keep them handy so you've got a cookbook listing of the command sequence. (I should point out that Microsoft has omitted the "Add installation? Yes" part of the procedure, which I show above, from the rebuild explanation it provides in its "method 2" section of the more detailed note.)
Vista's Reliability Monitor
Now that we've prepared for failure and learned how to fix a bad boot store, I wanted to close on an up note. It's a really nifty tool included in Vista called the Reliability Monitor. It catalogs Windows failures, as well as problems with your applications and your PC hardware.
To get at it, click the big Vista "start" button in the lower left-hand corner of the screen. Right-click "computer," then click "manage." A Window entitled "Computer Management" will pop open. Next, expand "Reliability and Performance," expand "Monitoring Tools," and click "Reliability Monitor."
Along with a list of specific problems, the monitor will provide you with an overall System Stability Index. From the looks of it, this number is more indicative of your PC's performance than is the oft-criticized Windows Experience Index. My machine got a stability rating of 7.95.
The System Stability Index is a number from 1 (least stable) to 10 (most stable) and is a weighted measurement derived from the number of specified failures seen over a rolling historical period. Reliability Events in the System Stability Report describe the specific failures… Recent failures are weighted more heavily than past failures, allowing an improvement over time to be reflected in an ascending System Stability Index once a reliability issue has been resolved… Days when the system is powered off or in a sleep state are not used… If there is not enough data to calculate a steady System Stability Index, the graphed line will be dotted…. If there are any significant changes to the system time, an Information icon will appear on the graph for each day on which the system time was adjusted.True, the Reliability Monitor may not actually fix anything, but it sure does provide a firm sense of how well your system is doing. On a related note, the Computer Management window, which houses the monitor, is well worth exploring of its own accord. It's got a really nice, expansive performance-monitoring display, which provides a much more accessible visual presentation of PC usage than does the one that most people use in the task manager.
I can't close this article without a word about System Restore, an underutilized but invaluable resource in Vista, as it was in Windows XP. System Restore is the scourge of AIM viruses unintentionally downloaded by your children, as well as malware which has burrowed its way onto your PC from Web sites you shouldn't have been visiting in the first place.
Finally, if all else fails (and if you haven't done the DVD image-backup process I described above), you always can reinstall Vista from scratch.
I'll have more tricks in an upcoming article, which will continue my focus on what to do about Vista installations that are either dead or tilting toward terminal instability. If you have any unique crashes you've encountered, or tips you'd like to share, please e-mail me at firstname.lastname@example.org.