Repairing boot sector problems in Windows NT-based operating systems
search cancel

Repairing boot sector problems in Windows NT-based operating systems

book

Article ID: 343229

calendar_today

Updated On:

Products

VMware VMware Desktop Hypervisor VMware vSphere ESXi

Issue/Introduction

This article guides you through the process of restoring the boot sector of an operating system based on Windows NT including, Windows NT 4.0, Windows 2000, Windows XP and Windows 2003. This article also covers restoring critical boot files.

For more recent operating systems -- Windows Vista, 7, and Server 2008 -- see Microsoft Knowledge Base article 927392 .

Note: The preceding link was correct as of April 27, 2015. If you find a link is broken, provide feedback and a VMware employee will update the link.

For more information relevant to Fusion customers, see Performing a Windows repair on a Windows XP virtual machine in Fusion (1013846).


Symptoms:
  • The virtual machine fails to start the operating system
  • The virtual machine fails to boot and does not issue a STOP error
  • Bootup halts at a black screen with a blinking cursor
  • You may receive these errors:
     
    • Operating System not found
    • Non-system disk or disk error
    • Windows could not start because the following file is missing or corrupt: \WINDOWS\SYSTEM32\CONFIG\SYSTEM
    • NTLDR is missing

      Press any key to restart

       
    • A disk read error occurred
    • The Master boot record (MBR) of this virtual machine's hard disk does not contain valid bootstrap code. It is likely that the MBR was corrupted by an incorrect guest operating system installation or some other reason. The virtual machine cannot continue and will now power off. (For advanced user: The MBR is the last disk sector accessed by the virtual machine before the error.) Please consult our Web site at http://www.vmware.com/info?id=18 for common troubleshooting help.
    • Windows could not start because of a computer disk hardware configuration problem. Could not read from the selected boot disk. Check boot path and disk hardware.


Environment

VMware P2V Assistant

Resolution

Windows 2000/XP/2003

To repair boot sector problems for Windows 2000/XP/2003
  1. Boot the Windows Setup disc and start the Recovery Console. Log in to the damaged operating system. For more information, see Microsoft Knowledge Base article 314058.
  2. Type fixmbr and press Enter to repair the master boot record.
  3. Type fixboot and press Enter to repair the boot sector. In some cases, you may have to type fixboot c:.
  4. Check the disk for corruption in the file system, if applicable. Type chkdsk c: /p and press Enter.
  5. Verify that the required boot files are present on the startup disk. Type dir \ and press Enter.

    Note: The ntldr, NTDETECT.COM files are listed and have a size greater than zero. If either ntldr or NTDETECT.COM are missing, copy the files from the Windows disc using the COPY command. For example, copy d:\i386\ntldr c:.
     
  6. Rebuild the boot.ini file. For more information on this command, see Microsoft Knowledge Base article 291980.
     
    1. Type bootcfg /rebuild and press Enter.
    2. At the prompt Enter Load Identifier, type the version of the Windows installation (for example Windows 2000 Server) and press Enter.
    3. At the prompt Enter Operating System Load Optionsif running Windows XP or 2003, type /fastdetect. Otherwise do not type anything and press Enter.
       
  7. Exit the recovery console. Type exit and press Enter.

    Warning: If you do not use the exit command to quit the Recovery Console, your changes may be discarded.
     
  8. Attempt to start the virtual machine normally. If the problem persists, create a Windows boot diskette to start the operating system and set the active partition.
     
    1. Insert or connect the Windows boot diskette, and boot from the diskette. For instructions on creating a Windows boot diskette, see the Microsoft Knowledge Base article 305595.
    2. Log in to Windows as an Administrator.
    3. Open the Disk Management console. Click Start > Run. Type diskmgmt.msc and press Enter.
    4. Right-click the system partition and select Mark Partition as active.

Windows NT

Note: Windows NT does not supply a Recovery Console tool. You must use another virtual machine to perform recovery on the damaged disk, another installation of Windows NT installed on the affected disk, or the Windows NT Emergency Recovery Diskette (ERD) created from the rdisk utility. Choose the most appropriate option for your situation. If you have an ERD diskette, use this option first. If you have used VMware Converter to create this virtual machine, you can run the rdisk tool on the source or attempt another conversion.
 
Using an existing virtual machine to repair problems with the damaged disk

If you have another functioning Windows virtual machine running Windows NT proceed with these steps. If you do not, you may not be able to complete all types of repairs possible.

  1. Use an existing helper virtual machine to edit the contents of the virtual hard disk on the newly created virtual machine.

    Warning: The helper virtual machine must be running Windows NT otherwise the NTFS file system is automatically upgraded and prevents the native CHKDSK utility from running on the volume in the future.
     
  2. Edit the configuration or settings of the helper virtual machine and include the virtual hard disk of the new virtual machine as a secondary disk.
  3. Power on the helper virtual machine.
  4. Perform a file system integrity check:
    1. Open a command prompt. For more information, see Opening a command or shell prompt (1003892).
    2. Type chkdsk d: /f

      Where d: is the drive letter of the damaged virtual machine disk.
    3. Press Enter.
       
  5. Verify that critical boot files are present on the damaged disk.

    1. Open My Computer.
    2. Click View > Options > View.
    3. Select Show all files.
    4. Browse the root of the file system of the damaged disk.
    5. Ensure that these files are present and have a file size greater than zero bytes: boot.ini, ntldr, NTDETECT.COM.
    6. If the files are missing, copy them from helper virtual machine's hard disk.
       
  6. Create a Windows NT boot diskette. You need this to start the damaged virtual machine and complete repairs. For instructions creating a Windows boot diskette, see the Microsoft KB article 305595.

    Note: The instructions are the same for Windows XP, except use the helper to create the floppy image or alternately another computer running a Windows-NT based operating system. You can use the files from the root of the helper virtual machine's hard disk or the Windows NT setup disc. Using a second installation of Windows NT to repair startup problems

    1. Attach the VMware SCSI boot diskette to the virtual machine's virtual floppy drive.
    2. Boot the virtual machine into the Windows NT Setup disc. Press F6 repeatedly when you see the message: Setup is inspecting your computer.
    3. Type s to specify an additional disk controller driver and select the VMware SCSI controller option.
    4. Proceed with the installation of Windows NT with the following options:
       
      1. When prompted to remove or reformat partitions, do not do so.
      2. When prompted for the installation directory for Windows NT, specify a new name that is not the same as the existing installation, typically \WINNT.
         
    5. When Windows NT is installed you can use it to run CHKDSK on the system volume and perform other operations from the previous section of this document. If you are unable to complete the second Windows NT installation due to a boot issue, create a Windows NT boot diskette per step 6 above and use it the boot the system into the second phase of setup.

Creating and Using an Emergency Repair Disk to restore the boot files

If you have an existing and recent ERD disk you can use it to repair boot problems.

If you used VMware Converter to create the virtual machine, use this process to create the ERD on the source computer:
  1. Click Start > Run.
  2. Type rdisk and press Enter.
  3. Click Create Repair Disk

To use the ERD disk to repair the Windows NT installation:

  1. Attach the VMware SCSI boot diskette to the virtual machine's virtual floppy drive.
  2. Boot the virtual machine into the Windows NT Setup disc. Press F6 repeatedly when you see the message:

    Setup is inspecting your computer
     
  3. Type s to specify an additional disk controller driver and select the VMware SCSI controller option.
  4. Insert the Windows NT ERD diskette into the floppy diskette drive and assign the virtual floppy drive to the physical floppy diskette drive.
  5. When prompted type r to use the ERD diskette to repair Windows NT. Follow the instructions on the screen to complete the process.
Repairing the boot sector to allow the Windows NT virtual machine to boot without a boot diskette
  1. Boot the virtual machine using the Windows NT boot diskette.
  2. Open the Disk Administrator. Click Start > Run. Type windisk and press Enter.
  3. Select the system partition. Click Partition > Mark Active.
  4. Copy the critical boot files from the Windows NT startup diskette boot.ini, ntldr, NTDETECT.COM, onto the root of the system disk.
  5. Remove or disconnect the Windows NT startup diskette and restart the virtual machine.
  6. If the system fails to boot you must recreate the Master Boot Record (MBR).
    1. Obtain an MS-DOS 6 or Windows 95/98 or ME boot diskette or diskette image.
    2. If applicable, boot to an MS-DOS prompt when prompted.

      Note: MS-DOS cannot read or recognize the NTFS formatted system partition. You can still proceed despite this.
       
    3. Type fdisk /mbr and press Enter.
    4. Remove or disconnect the boot diskette, and reboot the virtual machine.

Note : The preceding links were correct as of April 27, 2015. If you find a link is broken, please provide feedback and a VMware employee will update the link.


Additional Information

For more information related to being unable to boot a virtual machine, see: Solucionar problemas no setor de inicialização em sistemas operacionais baseados no Windows NT
修复 Windows NT 的操作系统中引导扇区的问题
Windows NT ベースのオペレーティング システムにおけるブート セクタ の問題の修正