On a recent trip to New York, I pulled one of those lovely maneuvers that we've all done at one time or another: In a bid to dual-boot Windows 98 with Windows 2000 on my laptop, I managed to wipe out the boot files needed to get into Windows 2000, which is my primary OS. Now I always travel with a full set of operating system and application binaries on CD so that I can re-establish my system if needed. But I'm also savvy enough to repair a Windows NT boot record using setup, so I figured the process would be similar in Windows 2000. Alas, that is not the case: In Windows 2000, the repair option under setup now gives you a choice between two confusing options, neither one of which is exactly like the old repair functionality. To be honest, the NT 4.0 repair option was much easier to use, but the repair capabilities in 2000, which were purportedly designed in response to customer feedback, are no doubt more powerful.
The two repair options in setup are Recovery Console and the Emergency Repair Process, which is somewhat similar to the old NT 4.0 Repair option. However, this requires an Emergency Repair Disk (ERD) to function properly and, like a goof, I hadn't made one (needless to say, I've since made one and I won't leave home without it again). As a result, I was forced to boot into the Recovery Console. What I found was impressive, especially given the NT legacy of Windows 2000. Let's take a look.
Introduction to the Recovery Console
The Windows 2000 Recovery Console is designed to allow a user with Administrative privileges to boot a system into a text mode console and perform, among other things, the following tasks:
- Format drives (partitions)
- Start and stop services
- Read and write files
- Repair a corrupt Master Boot Record (MBR)
- Repair a non-booting system
Now, the Recovery Console is definitely a power-user feature, but it's got enough going for it that any user with the appropriate privileges should take the time to figure it out. You can read and write to any type of partition (including NTFS and CD-ROM), making it ideal for copying files from any floppy, CD-ROM or hard drive that might be needed to repair your system.
Booting into the Console from Setup
You can access the Recovery Console from the Windows 2000 setup if your system won't start. Of course, you'll need a bootable CD-ROM drive, a Windows 98 boot disk, or the Windows 2000 setup diskettes. If you're a mobile user without a bootable CD-ROM, I recommend the Windows 98 boot disk approach because the four-disk Windows 2000 setup routine is slow going. Regardless of how you do it, the goal is to boot your system into the Windows 2000 setup routine. This will require you to sit through the initial file copying process (which is painful when you just need to repair an existing installation), but eventually you'll be given the option to set up Windows 2000, repair a Windows 2000 installation, or quit setup. You want the second option, which is selected by pressing the R key.
In the next screen, you'll be given two options: Repair a Windows 2000 installation by using the Recovery Console, or by using the emergency repair process (Figure 1). If you do have the ERD, then by all means choose the second option. But for more comprehensive repair capabilities and other options, only the Recovery Console will do. Press the C key to continue (Figure 2).
At this point, you are given the option to choose which Windows 2000 installation you'd like to login to. Of course, if you've only got a single Windows 2000 installation on the system (hopefully this is usually the case), then you'll only have one choice. Curiously, you can type ENTER to cancel the operation, which is a user interface gaff of the highest order. When you've chosen the installation you'd like to login to, you're prompted for the Administrator password. Enter this and you're in (Figure 3).
Using the Recovery Console
The Windows 2000 Recovery Console resembles a full-screen command line session (or MS-DOS for you Windows 98 fans). There are two commands you absolutely must remember: help and exit. The help command will give you a list of all of the commands that are possible in the console (Figure 4), while exit ends your session in the console. The Recovery Console commands include the following:
- attrib - Changes the attributes of a file or directory.
- batch - Executes the commands specified in the text file.
- chdir (cd) - Displays the name of the current directory or changes the current directory.
- chkdsk - ("Check disk") Checks a disk and displays a status report.
- cls - Clears the screen.
- copy - Copies a single file to another location.
- delete (del) - Deletes one or more files.
- dir - Displays a list of files and subdirectories in a directory.
- disable - Disables a system service or a device driver.
- diskpart - Manages partitions on your hard drives.
- enable - Starts or enables a system service or a device driver.
- exit - Exits the Recovery Console and restarts the system.
- expand - Extracts a file from a compressed file.
- fixboot - Writes a new partition boot sector onto the system partition.
- fixmbr - Repairs the master boot record of the partition boot sector.
- format - Formats a disk.
- help - Displays a list of the commands you can use in the Recovery Console.
- listsvc - Lists the services and drivers available on the computer.
logon - Logs on to a Windows 2000 installation.
- map - Displays the drive letter mappings.
- mkdir (md) - Creates a directory.
- more - Displays a text file.
- rename (ren) - Renames a single file.
- rmdir (rd) - Deletes a directory.
- set - Displays and sets environment variables.
- systemroot - Sets the current directory to the "systemroot" directory (typically C:\WINNT) of the system you are currently logged on to.
- type - Displays a text file.
One nice thing about the Recovery Console is that any option that requires text to scroll off the screen will actually put up a menu of choices at the bottom of the screen, allowing you to scroll one line at a time, one screen at a time, or cancel the operation. One obvious tool that is missing from this console, however, is edit. Microsoft is looking into adding this in the next release.
Adding the Recovery Console to BOOT.INI
If you'd like to add the Recovery Console to your Windows 2000 boot menu so that it's a choice every time you start the system, you can insert your Windows 2000 CD-ROM and type the following at a command line (assuming D: is your CD-ROM drive):
I'm sure you're wondering how I fared with my recovery attempts (who wouldn't?): While I was ultimately able to get my system booting again, I had to manually add the correct entry to my BOOT.INI file to make this work. For this and other reasons, I strongly recommend keeping an ERD near your system at all times. If you're a mobile user, you might want to consider bringing along two copies of this vital tool every time you travel. While I happen to be familiar with the proper ARC string required to get my system to boot off the second partition on the first fixed disk, I can't imagine that most users are such geeks: Make an ERD (you do this from the Backup tool, incidentally), and keep it safe. Bring it with you when you travel.
Regardless of my own stupidity (as a last resort, I could have actually reinstalled Windows 2000 over itself in the same partition; this would have restored my system, albeit in a slow and inefficient way), I came away pretty impressive with the Recovery Console. I hadn't had any need to check it out before my recent mishap (isn't that always the case?) but I'm a strong believer in it now. Anyone that spends a lot of time in Windows 2000 is going to want to become familiar with this indispensable tool.