TechWeb

Accidental IT: Crash Insurance

Apr 26, 2005 (12:04 PM EDT)

Read the Original Article at http://www.informationweek.com/news/showArticle.jhtml?articleID=161601556


Welcome to Accidental IT, a series of technical how-tos for people whose job descriptions don't necessarily include tech support but who often find themselves doing just that for their co-workers.

The Recovery Console is one of the darker corners in Windows XP. It's one of those places you hope you never have to go. But whether a computer is crashing with blue screen Windows Stop errors, booting up in a funky manner, or simply not booting at all, the Recovery Console can save a seemingly impossible situation from becoming a total disaster. Even so, you can only make a bad problem worse if you try to pick your way through the fairly arcane command line entry system. Here are some instructions that will help non-geeks navigate that road safely.

How to Avoid the Recovery Console

First, the best advice is to simply avoid the Recovery Console altogether. This is often possible. After all, Windows XP is a lot less prone to crashing that its predecessors, and when something goes awry, such as a program freezing, you can usually squirm your way out of trouble by using the Windows Task Manager to kill uncooperative programs; making use of System Restore; editing the BIOS to tweak hardware settings; or rebooting in Safe Mode and uninstalling problematic software or hardware.

Your first move should be to make sure that the simple, yet very effective System Restore function can't get the PC in question back to its original working order. Just navigate to Start/Accessories/System Tools/System Restore and you can literally warp the PC back in time, before it started acting up.

If there is some recently installed hardware, double check that there are no hardware conflicts in the Device Manager of the System Control Panel. If the Device Manager doesn't list a conflict, get on the horn to that company's tech support and ask them about uninstalling the product. They will probably have you navigate to the Windows Registry and direct you to manually remove entries.

If the Windows XP System Restore function can't alleviate the problem and there are no conflicts listed in the Device Manager, it also can't hurt to try minor BIOS tweaks, such as disabling a problematic peripheral port, as these are relatively easily undone. Often, you can fix seemingly impossible problems by simple things such as disabling an unused USB port in the computer's BIOS settings, or disabling the Plug and Play OS option and manually assigning IRQs. While in theory USB is the ultimate Plug and Play interface, I've seen plenty of nasty USB conflicts, especially where third party USB expansion cards are involved, so nothing is foolproof. Ditto for sound cards and some secondary hard drive controller cards.

Whatever you do, be sure to have the full motherboard manual in front of you before you try tweaking the BIOS settings, and before you change anything, make detailed notes on the settings so you can restore them if needed.

Software crashes can also often be solved by simply uninstalling, and re-installing a program. However, install routines can sometimes get corrupted, especially if, for example, antivirus software was left on during the installation. Registry entries can remain changed, or partially changed, even if you uninstall a program. Commercial uninstallers like Ashampoo Uninstaller and registry utilities like Registry Mechanic can scan for unused or corrupted entries, but they're not full-proof, and many times a corrupted install routine will remain in the XP boot sequence.

Because Windows XP has a protected memory architecture, individual program crashes can usually be banished by killing the boogeyman in the Windows Task Manager, but if you experience a complete system lockup, it may indicate a more pervasive problem.


Click for full screen.


A "blue screen" error on the troubled PC, is indicative of more serious trouble, and it's a whole 'nother Accidental IT topic in itself. Briefly, however, here's what you should do. Blue screen errors begin with "A problem has been detected and Windows has been shut down to prevent further damage to your computer." Even if you can simply reboot and get back into Windows XP, that doesn't mean the problem is magically gone; in fact, it can get worse.

Solving blue screen errors takes a bit of sleuthing. First, write down the error code, and search for it on Google, you'll almost always pull up a Microsoft Knowledge Base page as one of the first entries. If not, go directly to support.microsoft.com and search from there. Also, be sure to duplicate the error code search on Google's Groups search function. This searches Usenet archives, and you may find some very useful message threads.

But there are some cases where no amount of BIOS tweaking and hardware and software uninstalls solve a PC's quirks, crashes, or simple refusal to boot, so roll up your sleeves, you're about to turn to the Dark Side.




The Dark Side

The Recovery Console is, in layman's terms, "safer" than Safe Mode. And if you've tried Safe Mode fixes to no avail, or you can't even get the damn PC to even turn on, the Recovery Console can save your bacon. Whereas, Safe Mode is a stripped down boot of Windows, the Recovery Console is so stripped down it looks suspiciously like... DOS. Remember DOS? Let me reassure you, it isn't DOS, so remain calm! However, using the Recovery Console does require manually entering basic command line inputs. There are a number of operations that you can perform here such as formatting a drive, enabling or disabling services and devices, and rebuilding or repairing the Windows boot menu. And if there's a serious conflict, you can usually fix it... without having to reinstall Windows.

Starting the Recovery Console

To start the Recovery Console, insert the Windows XP CD and restart the computer. The PC should prompt you if you want to boot from the CD. Choose YES. At the Welcome to Setup Screen, hit the R key to start the Recovery Console. You may need to type in an Administrator password, so be prepared beforehand.

In addition, the Recovery Console boot sequence will ask you if you want to load any third party drivers. So be prepared with a floppy disc that contains drivers for things such as secondary hard drive controllers ahead of time. If, for instance, you don't load a driver for a RAID or secondary disc controller on the PC, any remaining discs will be mislabeled, with the D drive possibly appearing as the C drive. You may wind up futilely searching for a file, or worse, formatting the wrong drive! To double check your mounted drives, once you've logged into the Recovery Console, type MAP to see all active drives and partitions.

Using the Recovery Console

Okay, so you've made it to the Recovery Console in one piece, having eliminated other potential fixes first. Now what? That depends on the specific problems with the PC in question. Luckily, there's a built in quick reference Help system that describes basic commands in case you get a bit lost. Simply type HELP at the prompt to see a list of available commands. Basic Recovery Console commands like COPY, DELETE, and DIR, which shows folder contents, will be familiar to anyone familiar with DOS. These can be useful if your PC problems aren't too severe or you just want to recover some files before formatting a troublesome drive. Sometimes a driver or critical system file like NTDETECT or NTLDR go AWOL, and they're easily restored using the COPY command to copy the missing files from the XP installation CD. Without going through the myriad of repair possibilities, here are the most useful fixes.

CHKDSK

The "Check Disk" function is a very helpful powerful, and simple tool that lets you repair and recover data from crashes. It can't really "hurt" the PC, and should be your first stop in the Recovery Console. It operates similarly to the Error Checking feature that you can access in Windows XP by right-clicking the disk icon and selecting Properties/Tools. From the Recovery Console, however, you can fully check the boot disk and Windows files since they're not in use. Simply type CHKDSK and the computer should run the scan. If there have been blue screen lockups on the PC, and/or you're reasonably sure there are errors on the drive, use the /P switch at the end of the command to override the message that tells you the drive looks OK. CHKDSK /P executes a more thorough search for errors, and can uncover (and fix) some nasty errors. Of course, you'll still have to uncover the problem that cause the disk errors in the first place, but at least you've undone some of the damage here.

BOOTCFG

This handy command scans all available hard drives for Windows XP, NT, and 2000 installations and can repair their entries in the OS select menu. This is particularly helpful on PCs with multiple OS installations, which can be common in some business settings. Type BOOTCFG /REBUILD to replace a corrupted file. For a more detailed description of the BOOTCFG functions, take a gander at Microsoft's support page

FIXMBR

Fixing the Master Boot Record is a pretty straightforward process that can magically make startup gremlins disappear. This is especially true if a hardware or software install went awry partway through. If you type in FIXMBR, a warning pops up saying you could cause even deeper trouble, but I've personally used this option more than any other, and it has never broken a PC more than it's broke already, and it has almost always fixed the problem.


Click for full screen.





LISTSVC

This is a useful command for disabling (or enabling) drivers or services that have wrought havoc on the PC in question. Simply type LISTSVC and you'll get a list of everything active on the PC. The only problem is that there are a slew of entries, and many of them are pretty cryptic, so be sure you know which entries are the boogymen before you change anything. A call ahead to tech support, to ask just what services the device in question uses, so you can manually disable them in the RC. You may have to talk to a level two technician to get the info you need. Type DISABLE followed by the name of the service to cripple it. The entry will be changed to start with SERVICE DISABLED. Of course, you can always restore said service/driver with the ENABLE command.

Customizing the Recovery Console

If you're smart, you can prepare the Recovery Console ahead of time to make life much easier. For one, you can add an Recovery Console option to the Windows XP boot menu choice so that you won't have to execute a sloooow boot from the Windows XP CD each time you restart. There's even more useful customizations you can make. Here's how to set up the most helpful RC tweaks.

First, log on to the PC as an administrator in Windows XP and run gpedit.msc from a command prompt (Start button, then pick Run). On the left panel, expand the Local Computer Policy/Computer Configuration/Windows Settings/Security Settings/Local Policies. Highlight Security Options, and in the right hand panel double click on Recovery Console: allow floppy copy and access to all drives and all folders. Select the enabled button and click OK. With this policy enabled, you can further customize the Recovery Console with the SET command when you log on as an Admin.


Click for full screen.




Reboot and navigate back to the Recovery Console. Once you're back into the RC, type SET ALLOWREMOVABLEMEDIA = TRUE. Be sure to leave a space before and after the equals sign. This command will let you copy data from hard drives to removable media like a Zip disk or floppy. SET ALLOWWILDCARDS =TRUE lets you use the standard * and ? in the Recovery Console commands. This is especially helpful when you need to move, copy, or delete large batches of files. SET ALLOWALLPATHS = TRUE is probably the most important and useful advanced parameter you can enable since the default limits your drive access to the Windows folder on the boot disc.

If you're going to be copying large numbers of data files, you can disable the warning prompt that pops up if you're going to overwrite other files. Type SET NOCOPYPROMT = TRUE

To double check the parameters you've changed, simply type SET and hit return at the RC command prompt, and you'll see a list of the settings.

If you want to add the Recovery Console as an option the Startup OS choices, put the XP CD into the drive, and from a command prompt (Start button, then pick Run) type: d:\i386\winnt32.exe /cmdcons

Swap d:\ for the actual letter of your CD drive and be sure to include a space after .exe. A popup will appear; pick Yes, and the Recovery Console will be installed.

You can also set the RC to automatically log a user on as an administrator, but this isn't recommended, especially if you think Chuck in Accounting might be curious enough (and ignorant enough) to cause even more mayhem on his computer. Be safe, and keep Chuck out of trouble by requiring an admin password when entering the RC.

Practice Makes Perfect

While the Recovery Console is pretty cryptic at first glance, it's not very difficult to learn the basics, and knowing them could save the day. It will pay to familiarize yourself with the Recovery Console ahead of time, so if there's a spare PC with XP installed you may want to try some practice runs before you really need to know what you're doing. After all, you don't want to read "Airplane Flying for Dummies" while the pilot is unconscious.

While Windows XP is a much more stable OS than previous versions of Windows, it's not bombproof, and a bit of advanced troubleshooting in the Recovery Console can make you a hero. Knowing when not to use it is half the battle. But if there's a problem that alternative solutions can't fix, the Recovery Console can be just the ticket.

More Accidental IT
* Windows File Shares Enable Workplace Collaboration
* Connect Your Outlook Clients To Exchange Server...From Afar
* Migrating Data To A New PC
* Boosting Your WiFi Signal
* Best Backup Practices
* Managing USB Drives
* Setting Up An E-Mail Account In Outlook
* Spyware, Spyware Everywhere