Fix, Recover, Restore and Repair Windows XP - Using the Recovery Console and the CHKDSK Hard-Disk-Drive Diagnostic Tool/Utility |
| | |
The Recovery Console runs with even fewer of the most basic parts of Windows (drivers, etc.) than Safe Mode. It allows a user to penetrate deeper into the system than Safe Mode does because of the minimum number of files that are in use.
Note that some OEM installations of Windows XP, such as the version installed on Fujitsu notebook computers don't support the Recovery Console, probably because it enables inexperienced users to screw the system up and cause the manufacturer technical support problems.
If it's not possible to use any of the Safe Modes to recover the system, other than reinstalling Windows over itself, or performing a repair install/installation, both of which are dealt with on this page, you'll have to try using the Recovery Console, which is also available in Windows NT and Windows 2000.
Note that none of the versions of Windows Vista has the Recovery Console. Visit Recovering and Repairing Windows Vista on this site for the methods of recovering Vista.
The best way to run the Recovery Console is by doing so from the Windows XP CD, but it is possible to make six Windows XP boot disks that allow you to run it - if the PC is running the original version of Windows XP first made available in 2001. They provide you with the same options as booting from the Windows XP CD. It is possible to download the files from http://www.microsoft.com/downloads for the original version of Windows XP. There are separate versions for XP Home and XP Professional editions. But, because they allow passwords to be bypassed, Microsoft has abandoned this method of recovery.
Note well that if your computer has an SATA hard disk drive, the Windows XP installation disc does not have SATA device drivers (only device drivers for IDE hard disk drives), consequently, the installation disk won't be able to recognise the drive and you won't be able to go any further using it to boot from unless you have the SATA drives on a floppy disk and your computer has a floppy disk drive, which most recent computers don't have. That means that unless that SATA drivers are installed you won't be able to perform a repair installation or use the Recovery Console from the installation disc.
Most recent computers have SATA hard drives. You can find out if your computer has an IDE or an SATA hard disk drive by entering devmgmt.msc in the Start => Run box to bring up the Device Manager, opening Disk drives in it by clicking on the + beside that heading. If the hard drive's manufacturer's device drivers are installed for the drive (not the standard Windows drivers), the drive should be named. On my laptop the named drive is: Toshiba MK1032GSX. Enetring this make/model in Google reveals it to be an SATA drive. -
http://www.tomshardware.com/reviews/toshiba-sata-drives-lack-performance-increase,1173-2.html
Read the following article on this problem:
Resolving "Setup did not find any hard disk drives" during Windows XP Installation -
However, you can create various other boot discs of your own. For more information, visit How to create a boot (startup) CD/DVD for Windows XP.
If you'd prefer direct access to the Recovery Console, it's possible to install it on the boot hard disk drive. It is then added to the Windows boot menu, which offers it as a boot option at system startup. Information on how to do that is provided further down in this section.
The BIOS setup program must be set so that the CD drive is enabled as the first boot drive in order to be able to boot the system from the CD. If (or when) that is the case, place the CD in the CD drive and wait for the Setup screen to appear. It presents three options: to run the Setup program that installs Windows, to run the Recovery Console to repair Windows, and to quit without doing anything.
You'll have to enter the administrator's or user's password to gain access to the system. If you are using Windows XP Home edition, it installs you, its installer, as the Computer Administrator by default, which is the top-level User Account that allows you to install software and make changes to the system, etc. However, you have to enter User Accounts in the Control Panel to set the password for the Computer Administrator account or no password is required to be entered when Windows starts up or to enter the Recovery Console.
The Recovery Console itself looks like the standard Windows XP command prompt console, but you can only use set commands, some of which are very powerful, so don't use them unless you know what you are doing.
When it first opens, the Recovery Console lists the versions of Windows running on the system by numbering them. (Windows NT and Windows 2000 can also have a Recovery Console.) There is usually only one version, so it has the number 1. To run the Recovery Console, enter the number 1. If you just press the Enter key, you exit the Recovery Console.
Although the Recovery Console provides a MS-DOS-like command prompt that allows the use of a number of repair commands, many commonly-used MS DOS commands won't work, and the folders you can work with are restricted.
With the Recovery Console running the C:\Windows> prompt, type and enter Help to bring up a list of the valid commands.
Here are a few of them:
CHKDSK - displays hard disk drive status information.
CHKDSK /p - performs an exhaustive check of the hard disk drive, even if chkdsk has not been set to run on that drive.
CHKDSK /r - checks for bad sectors and makes sure that the system avoids them.
You can find out what the commands are by entering Help at the C:\Windows> prompt. You can change it to the root drive C:\ by entering the cd \ command. If you want to find out which switches are available with a particular command, enter it and then add a /? or enter the command followed by help. For example, enter CHKDSK /? or CHKDSK help to find out that it can be used with the /p and /r switches.
Note that Windows XP does not have the ScanDisk hard drive/floppy disk testing utility. CHKDSK is the only hard drive utility it has, and it is part of the Recovery Console. Read this long and interesting forum thread on CHKDSK: http://help.lockergnome.com/index.php?showtopic=20273.
What Windows XP's Help and Support has to say about chkdsk"Chkdsk creates and displays a status report for the disk. The chkdsk command also lists and corrects errors on the disk. The chkdsk command with the parameters listed below is only available when you are using the Recovery Console. The chkdsk command with different parameters is available from the command prompt. chkdsk [drive:] [/p] [/r] Parameters none Used without parameters, chkdsk displays the status of the disk in the current drive. drive: Specifies the drive that you want chkdsk to check. /p Performs an exhaustive check even if the drive is not marked for chkdsk to run. This parameter does not make any changes to the drive. /r Locates bad sectors and recovers readable information. Implies /p. Note The chkdsk command requires the file Autochk.exe. If it cannot find it in the startup directory (\%systemroot%\System32, by default), it will attempt to locate it on the Windows Installation CD. If you have a multiboot computer, be sure you are issuing this command from the drive containing Windows." MS Knowledge Base articles on CHKDSKClick the reference number to go to the article.
|
****
If you want to schedule CHKDSK to run at boot time, you can use the CHKNTFS command from Windows XP's Command Prompt. CHKNTFS "Displays or modifies the checking of the disk at boot time." To bring up the Command Prompt, enter cmd in the Start => Run box. You should see C:\Documents and Settings\The User's Name. Enter chkntfs c: to check the C: drive. You should get this message is the drive is working properly: "The type of file system is NTFS (or FAT32). C: is not dirty." Enter chkntfs /? to find out what the available commands and their switches are.
Alternatively, you can make chkdsk run when the system is restarted from within Windows XP in the following way.
Open My Computer, right-click on the C: drive (or any other drive you want to check), and select Properties => Tools. Click Check Now in the Error-checking status dialog area. A Check Disk box opens. Select the Automatically fix file system errors option and the Scan for and attempt recovery of bad sectors if you have to or want to run the the long test. Otherwise leave that box unchecked. You click the dialog box's own Start button to run the disk-check tests. A dialog box warning you that Windows can't complete the tests until you reboot enquires if you want to postpone the test until that time. Select the Yes option and then repeat this process for any other hard disk drives or partitions in the system. You can then reboot when all the drives/partitions have been scheduled for a disk check at reboot. Windows then checks each drive or partition to whatever level of thoroughness you selected, and repairs any correctable errors.
****
Click here! to read the Q&A called "I can't install the Recovery Console after updating to Windows XP SP2" further down this page.
Windows XP: Problems running the CHKDSK disk-checking utilityChkdsk (Checkdisk) can easily confuse users new to Windows XP, because the old MS DOS disk-checking tool was called Chkdsk. Windows 95/98/Me came with a better disk-checking tool Microsoft called Scandisk to differentiate it from the old DOS tool. Indeed, Windows 95/98/Me even warned against using that Chkdsk. But Windows 2000 and Windows XP still call their disk tool Chkdsk. Windows 95/98/Me users who move to Windows XP and then look for Scandisk won't find it, and, because they remember that warning, they may even shy away from trying to use the latest version of Chkdsk. But in Windows 2000/XP, Chkdsk is the current disk tool that you would use where you would normally use Scandisk in Windows 95/98/Me. - Chkdsk is covered in the Windows XP Help files. Problem 1 Question: I recently upgraded to a new hard drive which was installed under NTFS. I find that I am now unable to utilise CHKDSK at system startup to check the disk for errors. I found this problem referenced in Microsoft Knowledge Base Article 823439 dated August 2003, stating that Microsoft was aware of the issue. But there is no solution noted in any later posting. Has there been any resolution to this problem? Answer: Do you have ZoneAlarm installed and did you recently upgrade it to version 5.0? It has been reported that ZoneAlarm 5.0 may be the root cause of your problem. Uninstalling it is the remedy. Some MS Knowledge Base articles on CHKDSK: "'Cannot Open Volume for Direct Access' Error Message When Chkdsk Runs at Startup" - http://support.microsoft.com/default.aspx?scid=kb;en-us;823439&Product=winxp "CHKNTFS.EXE: What You Can Use It For" - http://support.microsoft.com/default.aspx?scid=kb;en-us;160963 "Chkdsk in Read-Only Mode Does Not Detect Corruption on NTFS Volume" - http://support.microsoft.com/default.aspx?scid=kb;en-us;q283340 Problem 2 Problem: While trying to run the Chkdsk utility, I keep getting the following message every time the computer starts: Cannot open volume for direct access. The type of the file system is NTFS. IFSUTIL: Can't open drive. Status returned = c0000043. Windows has finished checking the disk. Answer: This is a problem affecting some users, but as yet there's no fix for it. So many users have had this problem that Microsoft has posted a place-holder item in the MS Knowledge Base: http://support.microsoft.com/default.aspx?scid=kb;en-us;823439&Product=winxp. What it says is not very helpful: "Microsoft is researching this problem and will post more information in this article when the information becomes available." So, if you're having this problem, all you can do is bookmark the above page and check back until the diagnosis and fix is provided. Problem 3 CHKDSK runs whenever you start of restart your PCChkdsk Runs Each Time That You Start Your Computer - this is probably the most common occurrence: http://support.microsoft.com/?kbid=316506 Chkdsk.exe [CHKDSK] or Autochk.exe starts when you try to shut down or restart your computer: http://support.microsoft.com/?kbid=831426 |
MAP displays drive-letter mappings.
TYPE shows the content of a text file.
DISKPART is the equivalent of FDISK in DOS and Windows 95/98/Me systems. It allows you to create and remove drive partitions.
ENABLE enables a device driver or service.
DISABLE disables a service or device driver.
If the system won't boot all the way into normal mode, and you can bring up the boot menu that presents itself when you press the F8 key repeatedly at system startup, you can choose the Enable Boot Logging option. You can then allow Windows to boot up until it gets stuck. Now you can use the Recovery Console to disable what is causing the problem. You boot from the Windows XP CD and enter the Recovery Console. Entering cd C:\Windows changes from the root directory, C:\, to the Windows directory. You then use the TYPE command to display the contents of the bootlog file, which is called NTBTLOG.TXT. You scroll down the list until you reach the point where Windows failed to boot all the way into normal mode. Make a note of the service or device driver that was last loaded. Now you can use the Recovery Console's DISABLE command to disable the suspected service or device driver prior to rebooting the system. Note that you can use the ENABLE command to re-enable a service or device driver.
FIXMBR (the equivalent of fdisk /mbr command in Windows 95/98/Me systems) rewrites the code of the Master Boot Record of drive 0 - the primary master hard disk drive. Note well that writing a new master boot record to the primary partition, which usually houses the Windows installation, can cause other partitions to become inaccessible.
However, the FIXMBR command can be used to recover the system if it has delivered specific messages that warn of a damaged master boot record. The command rewrites the code of the Master Boot Record of drive 0 - the primary master hard disk drive. To find out what Windows has called all of the available drives, use the MAP command. Entering the MAP command in the Recovery Console displays a list of all of the available storage devices. The boot hard disk drive is usually called \Device\HardDisk0, so to rewrite the master boot record of that drive, you would enter the command: fixmbr \Device\HardDisk0. Using this command can cause other partitions to become inaccessible, so you should not use it unless there is no other way left for you to recover Windows XP.
FIXBOOT rewrites the above drive's boot sector.
BOOTCFG displays and allows the user to edit the operating system list in the Boot.ini file that configures the boot manager, which shows at startup if there is more than one operating system installed, allowing the user to choose which one to use. The Bootcfg /Rebuild command is a particularly useful option that can be used to rebuild the system when it issues "Missing or corrupt HAL.DLL," "Invalid Boot.Ini," or "Windows could not start..." error messages. Read the next item for more information on using this command.
ENABLE allows deactivated Windows services to be switched on again without the need to reinstall Windows.
LISTSVC displays the names of all of the services that Windows can run at startup.
COPY can copy files, but it can't be used for extensive back-ups because wildcards cannot be used unless you employ a tweak that is detailed in this article - http://www.informationweek.com/story/showArticle.jhtml?articleID=187000225 - that allows you to remove many of the restrictions that limit the use of the Recovery Console. Click the Print option in a box at the top of the article and use your browser's Save As option to save it as a single page.
If Windows XP issues "Missing or corrupt HAL.DLL," "Invalid Boot.Ini," or "Windows could not start..." error messages at startup, you can use the Bootcfg /Rebuild to rebuild and recover the system.
The five steps involved are as follows:
1. - Boot from the Windows XP Setup CD and enter the Recovery Console. When the setup program runs, you will have the option to Press R to start the Recovery Console. If you are using a Windows XP SP1 CD and the system has been updated to Windows XP SP2, you should use a "slipstreamed" CD that incorporates SP2 so that outdated SP1 files are not used on an SP2 system. There is information on how to do that at the bottom of this page.
2. - Enter the command Attrib -H -R -S" C:\boot.ini to remove the Hidden, Read-only, and System file attributes so that it can be located, because it is a hidden system file by default. When the recovery process is complete, for security reasons, you should reverse the boot.ini file's attributes to hide it again by using the Attrib +H +R +S" C:\boot.ini command from the command prompt. (Enter Attrib /? at the command prompt to bring up information on the switches available for it.) You can also do that from within Windows by right-clicking on the boot.ini file and then clicking Properties in the menu that come up. You just have to place check marks with your mouse in the relevant boxes.
3. - Delete the C:\boot.ini file by using the del c:\boot.ini command. Don't worry about doing that. The file will be rebuilt by the rebuilding process.
4. - Enter the Bootcfg /Rebuild command at the command prompt. Assume that the information that is presented is correct and enter Y for yes.
You should be asked to Enter Load Identifier, which is the name of the operating system that will appear in boot menus. Depending on the version of Windows being used, enter Microsoft Windows XP Professional or Microsoft Windows XP Home Edition. Next you have to Enter OS Load Options. For normal installations, enter /Fastdetect.
5. - Enter the Fixboot command. This writes a new partition boot sector to the boot drive, which simplifies the boot process and gives the system the best chance of making a successful recovery. Enter Exit to quit the Recovery Console and reboot the computer, which should then restart normally.
If you'd prefer direct access to the Recovery Console, it's possible to install it on the boot hard disk drive. It is then added to the Windows boot menu, which offers it as a boot option at system startup. To install it, run the winnt32.exe file from the i386 folder on the Windows XP CD, using the /cmdcons parameter.
To do that enter the command cmd in the Start=> Run box to bring up the Command Prompt. If the CD/DVD drive's drive letter is the standard D: use the appropriate command to change to it (C:\>D:). Then use the cd\i386 command to change to the i386 folder. You should see this: D:\i386>. Then just enter winnt32 /cmdcons to install the Recovery Console.
If D: is the CD drive, the final command looks like this: D:\i386\winnt32 /cmdcons.
If the computer is connected to the Internet, the Recovery Console can be updated online during the installation process.
The time allowed for the boot manager to display at startup can be set under System Properties. Pressing the Windows and Pause keys makes the System Properties window present itself. The Settings button is on the Advanced tab under Startup and Recovery. Set the Time to display list of operating systems option to the length of time that you want the boot menu to show.
Install the Recovery Console on Your Computer: http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/tips/vinson1.mspx
If you want to remove the Recovery Console from the boot process (so that the option to run it at startup no longer presents itself), find the boot.ini file (usually here: C:\boot.ini), open it with Notepad, remove the line that loads it, and save the change. Don't use Windows XP's Search facility to locate the boot.ini file because even with Folder Options (in the Control Panel) set to show all files, including hidden system files, it doesn't locate it.
If you want to extract a single file from the Windows XP CD, for example, the Kernel32.dll file, you can use of the Recovery Console to do it. This MS Knowledge Base article explains the method - Windows XP logon screen does not appear and the computer continuously restarts:
http://support.microsoft.com/?kbid=310396.
The Recovery Console is a very restricted version of Windows XP that has been reduced to its barest state, from which it is possible to effect repairs and perform low-level maintenance. The user is restricted to being able to work in only a few system folders, and access is refused to any other parts of Windows or folders on the installed hard drive(s). You can't use wildcards such as *.exe to represent all executable files ending in exe, and you can't copy files to removable media such as floppy disks and CD/DVD discs. Moreover, you are prompted when overwriting each and every file. However, a simple tweak removes all the above-mentioned restrictions, making the Recovery Console become, in effect, a general-purpose MS DOS in Windows XP, providing much of the same functions as MS DOS boot floppy disks can provide in Windows 95/98/Me. Visit the following article to find out how to employ the teak. -
http://www.informationweek.com/story/showArticle.jhtml?articleID=187000225
Click the Print option in a box at the top of the article and use your browser's Save As option to save it as a single page.
A Description of the Windows XP Recovery Console: http://support.microsoft.com/?kbid=314058
The same information on the Windows 2000 Recovery Console can be found here:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;229716
How to Install and Use the Recovery Console in Windows XP: http://support.microsoft.com/?kbid=307654
'The Password Is Not Valid' Error Message Appears When You Log On to Recovery Console in Windows XP:
http://support.microsoft.com/?kbid=308402
You can, of course, read up on the Recovery Console (or any of the other features mentioned) in the Windows XP Help & Support files, and you can find plenty of articles on the subject by entering the term in the Google search box at the top of this page, or by conducting a Google Groups search of past Usenet posts.
****
Problem
A computer with two IDE ATA hard disk drives using RAID was successfully running a dual-boot system with Windows Me installed on the C: drive, and Windows XP installed on the other hard disk drive. On startup the user used to see a boot menu that presented a choice of which operating system to boot into, but when a replacement blank hard disk drive was installed and Windows Me was installed on it, the boot menu no longer appeared, so the user can't boot into Windows XP.
Answer
When more than one operating system is installed on a computer, each of them usually has to be installed on a separate drive partition - or, as in this case, on a separate hard disk drive. But unless the boot order of drives is changed in the BIOS setup, the computer will always boot from the master hard drive installed on the primary IDE channel. In this case, this is the hard drive that has Windows Me installed on it.
When the user installed Windows XP on the system set up to use RAID, the original boot sector on the Windows Me drive was replaced by the NT boot manager, which provides a choice of which operating system to boot up with at startup.
A text file called Boot.ini - on the root directory of the C: drive - provides the presented options on the boot menu, and also contains the location of the two operating systems, without which it wouldn't be able to be located them. The user has replaced the C: drive, but hasn't replaced the code that provides the location of Windows XP. Therefore, just the missing code has to be restored to restore access to Windows XP.
Some of the OEM system recovery disks that come with brand-name computers can't do so, but all Windows XP CD's can boot the system. To do this, place the Windows XP CD in the CD-ROM drive and reboot. You may have to change the drive boot order in the BIOS setup to make sure that the system boots from the CD-ROM drive instead of from the hard disk drive.
When the system starts booting from the CD, a prompt to press the F6 key will appear if it needs to load additional device drivers. Since the user is using RAID, the motherboard has a RAID controller, which requires drivers that Windows can't provide. The user has to press the F6 key, and then provide the disk containing the RAID drivers.
The order of options presented varies from one version of Windows XP to another, but there are two possible paths to follow. In this particular case, the most simple and the most dangerous option to choose is Setup followed by Repair existing installation. Otherwise, the user can opt to run the Recovery Console.
At some point after booting, the option to Repair a Windows XP installation using Recovery Console should appear. The R key is pressed to choose it. The user should then see the Windows XP installation listed.
The Administrator password is asked for, which might be problematic, because the Administrator account is set up when XP is installed, but thereafter is never used so it doesn't appear on the list of the available logon options.
The password is often left blank, so the user can try just pressing the Enter key. But if that doesn't work and the user can't remember the password click here! to go directly to an article on this site called, How to Log On to Windows XP If You Forget Your Password - or Your Password Expires.
After the password has been entered, a window containing a DOS-style command prompt appears. But this isn't DOS, it's the Recovery Console, which can only run a special set of troubleshooting commands. Entering the command help provides a list of the available commands, some of which are listed when the Recovery Console was dealt with further up this page.
The user needs to use the command called FIXBOOT, which reinstalls the NT boot manager on the C: drive.
Enter the following two commands. Since I don't know which letter it uses, the letter X stands for the drive letter used by the CD-ROM drive.
copy X:\i386\NTLDR C:
copy X:\i386\NTDETECT.COM C:
[This copies the NT boot manager from the CD-ROM drive to the C: drive]
Next, entering the command BOOTCFG /rebuild creates a new Boot.ini file that will list both installed versions of Windows.
Next, a prompt to enter the options for the System Identifier (Bootcfg) appears. This adds the information that appears on the boot menu. To identify the operating system, enter Windows XP, and for the options for Windows XP enter /fastdetect.
Bootcfg can't add Windows Me to the boot menu, so the user has to edit the Boot.ini file by entering the command EDIT C:\BOOT.INI, and then add C:\="Microsoft Windows Me" to the file under the its Operating Systems heading.
After doing this, the user should be able to boot into either operating system at startup.
Adding the choice on the menu to boot to the Recovery Console is achieved by entering the command: X:\i386\winnt32.exe /cmdcons.
****
Problem
I installed Windows XP Professional several months ago, but I didn't install the Recovery Console. When I tried to install it from the original installation disk, the following error message came up: "Setup cannot continue because the version of Windows on your computer is newer than the version on the CD." I recently installed the Service Pack 2 (SP2) update, so is there any way I can install the Recovery Console without having to reinstall Windows XP and all of my software from scratch?
Answer
Many of the files on the original Windows XP setup CD would have been rendered out of date as soon as you installed SP1 or SP2 or SP3. That's why Windows warned you about adding older files to a new SP2 installation.
The solution involves installing the Recovery Console from a Windows XP setup CD that has been updated to include the SP2 or SP3 files. Several methods of 'slipstreaming' the Windows XP CD and the SP2 or SP3 update are provided in Slipstreaming Windows XP/Vista: How to create a Windows XP/Windows Vista installation CD/DVD containing the service packs and missing drivers (provided on this section of this website).
Using such an updated setup Windows XP CD not only allows you install Windows XP and all patches through your updated SP2/SP3 installation in one step, but it also allows you add or modify files and features such as the Recovery Console, because the files on the slipsteamed CD are the same versions as the versions that are running in the system (minus the updates that were issued after the relevant service pack, which have to be added by visiting Microsoft Update).
CONTENTS OF RECOVERING AND REPAIRING WINDOWS XP
Click the relevant link to go to that information
Introduction: Recovering and repairing Windows XP
Methods of recovering Windows XP
How to create a boot (startup) CD/DVD for Windows XP
How to perform a repair installation/install of Windows XP
Recovery by reinstalling Windows XP over itself and the consequences of so doing
Windows XP: Password problems - Password and document recovery
How to install a complete copy of Windows XP on an USB flash drive
How to troubleshoot and fix shutdown, restart (reboot), and startup problems
Windows XP: How to use the Files and Settings Transfer Wizard
How to avoid reactivating Windows XP after a fresh installation
Using the Windows XP Command Prompt
The System File Checker (SFC) and Roll Back Driver features in Windows XP
Using "Automated System Recovery" (ASR) and Restoring Windows XP to a serial ATA hard disk drive
|
|
|
PC Buyer Beware! Copyright © Eric Legge 2004-2009. All rights reserved.