If you've ever tried to fix a damaged Windows NT machine, you know how difficult it can be to do so. Part of the reason for this is that you can't work with Windows NT from a command-prompt level unless Windows NT is running. Therefore, if you have a problem that prevents Windows NT from booting, you're pretty much stuck. Assuming that you have enough free hard disk space, you can always install a second copy of Windows NT and use this copy to fix the original copy. However, using this process can really put your skills to the test if you need to do anything more than just basic file manipulation. Fortunately, Microsoft understands just how hard life can be. It’s built a tool into Windows 2000, called the Recovery Console, that does away with all these problems. In this Daily Feature, I'll discuss the Recovery Console in detail and explain how to use it to fix various problems.
Critical data. ERD Commander 2000 is a command-line based utility that boots from either a set of floppy disks, a CD-ROM, or directly from the hard disk of a Windows NT/2000 system. It allows users to perform recovery-related operations by accessing and modifying files on NTFS and FAT disk volumes. UBCD4WIN (Windows 2000 Professional). UBCD is a bootable CD/DVD. I've never used a boot CD, so feel free to correct me if need be and let me know if.
What is the Recovery Console?
The Recovery Console is a utility that's built into Windows 2000. This utility allows you to boot a PC containing a damaged copy of Windows 2000 to a command line. From the command line, you may accomplish such tasks as enabling and disabling services and manipulating files, even if they're stored on an NTFS partition.
Installing the Recovery Console
Unfortunately, the Recovery Console isn't installed by default. To install the Recovery Console on a functional PC, insert the Windows 2000 CD into the CD-ROM drive. When you see the Windows 2000 splash screen, close it. Now, open an MS-DOS Prompt window and navigate to the CD's I386 folder (or the ALPHA folder if you're using an Alpha PC). At this point, execute the following command:
WINNT32 /CMDCONS
Running this command will install the Recovery Console. We should warn you that the Recovery Console requires 74 MB of hard disk space. Once the Recovery Console is installed, you’ll be able to access it through a choice on the boot menu. If your copy of Windows 2000 is already damaged and you can't install the Recovery Console in this way, don't worry. There are other ways of accessing the Recovery Console. I'll discuss these methods later on.
Accessing the Recovery Console
Once you've installed the Recovery Console, you can access it by rebooting your PC and selecting the Recovery Console command from the boot menu. You’ll then be prompted to log into Windows 2000. You must log in using the Administrator account. If you've configured your system to act as a dual-boot or if you have multiple installations of Windows 2000, you must select the installation you want to work with before typing the Administrator's password.
Recovery Console commands
Upon arriving at the command prompt, you may be a bit puzzled as to what to do next. After all, it's not every day that you use the command prompt to repair Windows NT. Below, I've included a sample of some of the commands that will work in the Recovery Console.
ATTRIB | With the ATTRIB command, you can add or remove various file attributes, such as hidden or read-only. |
CHDIR (or CD) | Allows you to change to a different directory. |
CHKDSK | Checks the hard disk for errors and displays a status report. You can append the /F switch to get CHKDSK to fix the errors that it finds. |
CLS | Clears the screen. |
COPY | Copies files from one location to another. |
DELETE (or DEL) | Erases the files specified. |
DIR | Displays the directory's contents. |
DISABLE | Disables a service or a device driver. |
DISKPART | Allows you to create, delete, and manage partitions on your hard disk. |
ENABLE | Enables a service or a device driver. |
EXIT | Closes the Recovery Console and reboots the computer. |
EXTRACT | Allows you to extract individual files from the compressed files on the Windows 2000 CD. |
FDISK | Allows you to create, delete, and manage partitions on your hard disk. |
FIXBOOT | Writes a new boot sector onto the system partition. |
FIXMBR | Repairs the master boot record of the partition's boot sector. |
FORMAT | Allows you to format a disk or a partition. |
HELP | Displays all commands that are available through the Recovery Console. |
LISTSVC | Lists all available system services. |
LOGON | Allows you to log into the security system of the Windows 2000 installation of your choice. |
MAP | Displays mappings for network drives. |
MKDIR (or MD) | Creates a directory. |
MORE | Displays a text file's output one screen at a time. |
RMDIR (or RD) | Removes a directory. The directory must be empty before you can remove it. |
RENAME (or REN) | Allows you to rename a file. |
SYSTEMROOT | Sets the current folder to the systemroot folder of the system that you're currently logged into. |
TYPE | Displays the contents of a text file. |
Command help
A list of commands does little good if you don't know how to use them. Most of the commands that I've discussed are left over from MS-DOS. All of the standard DOS switches work with these commands. For example, you can use the /P switch with the DIR command to display one page of the directory at a time just like you could in a DOS environment. If you're a little rusty on the DOS commands, help is always available. You can access help at any time by typing the HELP command. This will display a list of available commands and their functions. If you need help with a specific command, you can type the command followed by the /? switch. Doing so will display the command's syntax. For example, to get help using the FORMAT command, type the following command:
FORMAT /?
A sample repair
Now that you know how to get help with the commands, let's walk through a sample repair routine. Suppose you have a PC that is low on disk space and has a malfunctioning service that prevents the PC from booting. Now suppose you add an extra hard disk to the computer to help with the disk space problem. Of course, it's rare that these two problems would become critical at the same time in real life, but using such a situation gives us the chance to provide you with a better demonstration of the Recovery Console's capabilities.
Let's begin by tackling the disk space problem. Because you’ve just installed a brand-new hard disk, it hasn't been prepared for use yet. You can do so by using the FDISK command. I won't list the exact steps involved in the FDISK command because they'll be different for everyone. Following my steps literally could be disastrous to your system. The idea, though, is to create at least one partition on the new hard disk.
Once you've created the new partition, you need to format it. Before doing so, you need to know which drive letter FDISK assigned to it. If FDISK assigned the letter E to your new partition, you could format it using the following command:
FORMAT E:
Once you've formatted the drive, you need to move some of your data over to it. You can do so by selecting a directory containing data and creating a duplicate directory on the new drive. Next, you copy the files from your old disk to the new one and remove the original copy. Below is a sample of this procedure:
E:
MD MYDATA
C:
CDMYDATA
COPY *.* E:MYDATA
ERASE *.*
CD
RD MYDATA
Now, let’s discuss the malfunctioning service. Suppose you’ve determined that the Alerter service is causing your problem. The first thing you should do is use the LISTSVC command to determine the exact name of the service. Once you’ve determined the exact name for the Alerter service (Alerter), you can disable it. To do so, type the command
DISABLE ALERTER
then press the [Enter] key.
Upon doing so, you'll be informed that the Alerter service has a start type of SERVICE_AUTO_START but that it has now been disabled with a start type of SERVICE_DISABLED.
At this point, you've fixed the disk space problem, and you've made the computer bootable by disabling the service that was causing your problem. You can now type the EXIT command to reboot the PC and launch Windows 2000 in its normal graphical mode.
Alternative Recovery Console installation methods
In the examples that I've used so far, I've discussed installing the Recovery Console on a working PC. But what if your PC isn't working? In the final release of Windows 2000, you’ll be able to use the four boot disks or the Windows 2000 CD-ROM to install the Recovery Console.
To do so, boot your PC off the Windows 2000 CD-ROM, if possible. If your PC can't boot from the CD, boot from Setup Disk 1. As Setup launches, you'll be asked if you want to begin installing Windows 2000. Press [Enter] to continue. Next, Setup will ask you if you want to continue installing Windows 2000 or repair an existing installation. Press the [R] key to start repairing the damaged installation. When you do, you'll be prompted as to whether you want to repair your system using the Recovery Console or the emergency repair process. From this point, follow the prompts to install the Recovery Console.
Conclusion
One of Windows NT's downfalls has always been that it's difficult to access the system when a repair is needed. Fortunately, Windows 2000 gets around this problem by providing you with a command-line interface known as the Recovery Console. The Recovery Console allows you to manipulate most aspects of Windows NT through the command prompt whether or not the PC is functional.
Brien M. Posey is an MCSE and works as a freelance technical writer and as a network engineer for the Department of Defense. If you’d like to contact Brien, send him an e-mail. (Because of the large volume of e-mail he receives, it's impossible for him to respond to every message. However, he does read them all.)
The authors and editors have taken care in preparation of the content contained herein, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes. Using your corporate network to install Windows 2000 Professional can be a smart move for you when installing the operating system on your client computers. Not only will the installation be faster, but you can also perform it from virtually anywhere, providing you have the TCP/IP boot disk that I’ll show you how to create in this Daily Drill Down. After creating the boot disk, you’ll be able to use it to install the Microsoft Network Client for MS-DOS on the workstation and then connect to a server holding the Windows 2000 Professional source files. From that point, you’ll be able to install Windows 2000 Professional as if you were using the installation CD.Ensuring hardware compatibility
Before installing Windows 2000 Professional, you must ensure that your computer meets the minimum hardware requirements for the operating system. In addition, all of the hardware components must be compatible with Windows 2000 Professional. You can verify compatibility by finding your components on the Hardware Compatibility List (HCL). Both of these topics have been covered in TechProGuild’s Daily Drill Down “Installing Windows 2000.”
Preparing the disk drives
In our previous Windows 2000 Professional installation Daily Drill Down, you were given a choice of using FAT, FAT32, or NT File System (NTFS) file systems. However, when you install Windows 2000 Professional over a network connection, you must use FAT or FAT32. If you‘re determined to use NTFS, don’t despair because you can always convert the file system to NTFS after installing the operating system.
You’ll use our old DOS friend FDISK to prepare the computer’s hard drive for the Network Client v3.0 for MS-DOS and Windows. First, you should create a partition of more than 220 MB on the drive. Windows 2000 requires at least 219 MB of free disk space to perform the installation.
Once you create the partition, you must use DOS to format it as a bootable system disk. After verifying that you can boot the system using the hard drive, you can turn your attention to the floppy disk.
Because the hard drive has already been formatted with the appropriate file system, you can use it to format and create a bootable DOS floppy disk. This disk will become the bootable network installation disk that we’ll use to boot the client computers. After verifying that the disk is bootable, you are ready to move on and create the network installation boot disk.
Creating the network installation boot disk
Windows 2000 doesn’t provide you with the necessary utility program to create a network installation boot disk. However, the same files you might have used with Windows NT 4.0 Server can be used with Windows 2000.
The Network Client Administrator utility files are located in the I386 directory of the Windows NT 4.0 Server installation CD. After creating a folder called C:Ncadmin, copy Ncadmin.cn_, Ncadmin, and Ncadmin.hl to the folder.
Before you can use the Network Client Administrator program, you must unpack the files. To do this, go to the command prompt and change directories to C:Ncadmin. You will then issue the command
expand –r ncadmin.*
to unpack the files.
Once the files have been unpacked, you can return to the GUI and launch Ncadmin.exe to activate the Network Client Administrator utility. As shown in Figure A, the first dialog box asks you to select the type of activity you want to perform. You should keep the default selection of Make Network Installation Startup Disk.
Figure A |
Use Ncadmin.exe to create a network installation startup disk. |
The next dialog box allows you to copy the client files to a new directory and create a share for the folder, as shown in Figure B. The default path selection should represent the Windows NT 4.0 Server CD-ROM if the installation disk is in the computer’s CD-ROM drive. You can modify this path if necessary so that it reflects the appropriate path to the NT 4.0 source files. As stated earlier, the client files are located in the I386 directory.
Figure B |
Ncadmin.exe will ask you to set a path for installation files as well as a destination path. |
The default activity selection is Copy Files To A New Directory And Then Share. These values should reflect the appropriate path and share name you’ll use for storing the client files. For this example, we accepted the default location of C:Clients and the share name of Clients. When you click OK, the client files will be copied from the Windows NT 4.0 CD-ROM to the specified location. As stated in the dialog box, the files will take up approximately 64 MB of space.
When the files have been copied, you’ll see a window indicating how many directories were created and how many files were copied. Click OK to continue.
The Target Workstation Configuration dialog box will let you specify the type of boot disk that you will create. As shown in Figure C, your first selection is the type of floppy disk that will be used for the boot disk. Since the majority of today’s computers are using the 3.5” floppy disk, it has been made the default selection.
Figure C |
The Target Workstation Configuration dialog box lets you choose the type of floppy, network client, and network adapter card to use. |
Your next choice is the type of network client you will use. In this example, I selected Network Client v3.0 for MS-DOS and Windows. Windows 95 is your other option.
The final choice you can make is the type of network adapter card your client computer uses. Use the pull-down menu to select the client’s adapter. If your adapter is not in the list, you should select one that is similar and then modify network adapter settings to reflect those of your computer. In this example, I selected 3Com EtherLink III.
The Network Startup Disk Configuration dialog box lets you specify some startup options for your boot disk. For example, you can choose a computer name, user name, domain, network protocol, and TCP/IP settings. In the example shown in Figure D, I named the computer W2K-PRO and accepted the rest of the default settings.
Figure D |
Set up your boot disk’s network configuration. |
After clicking OK, you’ll be prompted to insert the bootable floppy disk into the disk drive. Once you have done this and clicked OK, you’ll be presented with the Confirm Network Disk Configuration window. If the configuration settings are correct, click OK to begin copying files.
When the file-copying process is complete, you’ll see a message window. At this point, the network installation boot disk has been created. If you were unable to select the correct network adapter from the drop-down list, you must modify the network adapter settings in the Protocol.ini and System.ini files before attempting to use the boot disk.
Using the network installation boot disk
Once the boot disk has been configured appropriately for your network, you should be able to insert the disk into the client computer’s floppy drive and use it to boot the computer and establish TCP/IP network connectivity using an IP address assigned by a DHCP server. If the configuration is correct, you should be prompted to type a user name or press [Enter] to accept the user name you supplied during the boot disk configuration.
After entering the user name, you’ll be asked to supply the password. Once you have done so, you’ll be prompted to create a password-list file for the user name. You can elect to do so, but you should realize that if you lose your boot disk, the password file is stored on it, allowing anyone who has the disk to gain access to the network. If you do not create the password file, you’ll be asked to do so each time you authenticate. This is a minor inconvenience when compared to the possible consequences of losing the boot disk with the user name and password.
Once you are authenticated, you’ll be prompted to set up Microsoft Network Client v3.0 for MS-DOS. After pressing [Enter] to continue, you can specify the path to be used for installing the files.
Use the first screen to select the user name, setup options, and network configuration of the DOS network client. The setup options you can modify are described below. You must use the arrow keys to navigate throughout the menus.
- Change Redir Options—You can select either Use The Full Redirector or Use The Basic Redirector. If you’re going to log on to a Windows NT or LAN Manager domain, or you plan to use advanced network features such as named pipes, you must use the Full Redirector. This is the default setting.
- Change Startup Options—You can select Run Network Client, Run Network Client And Load Pop-Up, or Do Not Run Network Client.
- Change Logon Validation—You can select either the default choice of Do Not Logon To Domain or Logon To Domain.
- Change Net Pop Hot Key—This option allows you to change the key you’ll use to activate the pop-up interface with the default key combination of [Ctrl][Alt]N.
When your options are configured correctly, select The Listed Options Are Correct to finish the client installation. After the file-copying process is complete, remove the floppy disk from the disk drive and press [Enter] to restart the computer.
Installing Windows 2000 Professional using the DOS network client
When the computer reboots, it will use the DOS network client to connect to the network. If you are logging on to a domain, you’ll be prompted for the domain password for the user after entering the user name and password. After doing so, you’ll be authenticated to the domain and can access the shared location of the Windows 2000 Professional source files.
For example, I used the following command to access the Windows 2000 Professional source files:
NET USE M: RHYTHM022K_SRC
After connecting to the share that has the Windows 2000 Professional source files, you can execute the setup program Winnt.exe (or Winnt32.exe if you are using the Windows 95 client). These files are found in the I386 directory.
From this point on, the installation procedure should be similar to any other Windows 2000 Professional installation.
Conclusion
Using the network installation boot disk to perform a Windows 2000 Professional installation over your company’s network allows you to quickly establish network connectivity to perform the operating system installation. Even if you elect to use a disk-imaging program such as Ghost, you can still use the versatile network installation boot disk to establish TCP/IP connectivity to the server holding the appropriate files for such an installation.
The authors and editors have taken care in preparation of the content contained herein but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.