Site search
Logo

Repair your computer in Windows 10

By , winhelp.us logo. Last updated: 2020-10-07

How to use Windows 10 Recovery Environment for repairing common startup problems

If Automatic Repair fails and you cannot even get into Safe Mode, then most probably there are some errors or missing files on your hard disk that prevent Windows 10 from starting correctly. Bootable installation media (DVD or USB) or Recovery Drive/System Repair Disc are helpful in such cases.

This is a two-page article - page 2 covers restoring a system image, using the Reset this PC and Recover from a drive features and running a clean install of Windows 10.

Options to try before using Recovery Environment in Windows 10

  • Always boot to Safe Mode at least once - this often repairs corrupted file system and essential system files.
  • If Windows starts or runs properly only in Safe Mode, turn on Clean Boot mode to see if some third-party software or driver causes the problems.
  • If Windows is able to boot, use System File Checker and icacls.exe to repair corrupted system files.
  • While Windows is running, use free WhoCrashed for determining BSOD (Blue Screen Of Death) causes.
    Reliability Monitor might also reveal faulty drivers or software.
  • Use Windows Update troubleshooter if your PC is unable to apply updates, or offers them repeatedly.
  • In case of Windows Store apps (aka Metro UI or Modern UI apps) failing to run or update, being unstable or requiring constant repairs, clear Windows Store cache: open the Start menu, type wsreset, and click the result. Next, repeat the process, but right-click (or tap and hold on touch-screens) the result and choose Run as administrator. Further fixes are listed in the Fix Modern UI apps in Windows tutorial at my other site, winhelp.info.
  • Use DISM (Deployment Imaging and Servicing Management) tool to fix Windows Component Store corruption as instructed in the System Image Backup in Windows 8.1 (yes, 8.1, the process also applies to Windows 10) tutorial - this often resolves a multitude of problems.
    In case the DISM RestoreHealth command fails with error 0x800f081f, then the Non-destructive reinstall of Windows 10 is about the only option that fixes it.

Prerequisites of Windows 10 Recovery Environment

If Windows 10 is able to start and run, you can reboot right into Recovery Environment or launch Reset this PC. In Safe Mode, you can only reboot into Windows Recovery Environment; Reset this PC will not start properly.

To access Repair your computer/Recovery Environment (aka Limited Diagnostic State) in case Windows is unable to boot normally, you must have either Windows 10 installation media (USB or DVD) or Windows 10 Recovery Drive (USB) or System Repair Disc (CD/DVD) available.

If you do not have the Windows 10 installation media (e.g. Windows came pre-installed) or Recovery Drive/System Repair Disc, see the instructions on creating a bootable Windows installation media (DVD or USB).

Warning: do not use Windows 10 media for repairing Windows XP, Vista, 7, or 8/8.1 installations, or vice versa! You can only use the Command Prompt option for fixing file system errors in older Windows installations.

If you can borrow a correct Windows 10 installation DVD from a friend, make sure you get the right hardware architecture: you can only use 32-bit (x86) Windows disc for repairing 32-bit Windows installations and 64-bit (x64) Windows disc for fixing 64-bit Windows installations.

Because Windows 10 Recovery Environment does not include the RAM testing module, you should use Memtest86+ for checking if your computer's memory modules are fine. Please do this before using tools provided in Recovery Environment - there is no point in repairing Windows if defective memory would ruin it again soon.

The last resort is to recover your files with Puppy Linux in case nothing else helps.

Common problems with Windows 10 installations

Here is a list of problems that users encounter most often:

  • Endless Automatic Repair failures and restart loops - you can boot from installation media or Recovery Drive to fix errors and make Windows 10 usable again.

    The behavior can also be an indicator that Windows 10 does not have the required drivers for a disk controller. You can then enter BIOS/UEFI and set your disk controller mode (aka SATA mode, RAID mode, or Intel SRT) to Standard (aka Standard IDE or SATA, Legacy) instead of AHCI or RAID (take note of the original setting first!). This will often ensure that Windows knows which drivers to use for booting from the system drive.

    In case you have multiple hard drives or SSD-s in your desktop or laptop device, power it off and remove its power cord (and battery in case of a laptop). Then disconnect drive cables from all drives other than the one where Windows is installed. Plug the power cord back in, turn the device on, and see if this helps Windows to boot properly.

    After Windows 10 starts, upgrade storage drivers and software using Intel's Driver Update Utility or find the driver software from AMD's site. This often solves all problems. All major PC and motherboard manufacturers (HP, Dell, Lenovo, Asus, MSI, Gigabyte, and many others) also provide driver update software: see if their support site has it available.

    If nothing else helps, boot into Recovery Environment from Recovery Drive/System Repair Disc or Windows 10 installation media, open Command Prompt, and follow these instructions to disable Automatic Repair completely.
  • Disk check runs each time Windows 10 starts - on multi-boot systems (Windows 10 is installed along with an older version of Windows, or with some other operating system) you need to disable the Fast Startup feature in Shutdown settings. The feature (previously known as Hybrid Boot or Fast Boot) enables significantly shorter load times while Windows 10 starts after a shutdown or sleep/hibernation (restart performance is unaffected), but the file that contains fast boot information can be damaged by starting another version of Windows or another OS (Linux, for example). This causes Windows to run a disk check each time.

    Fast Startup is available only if a user or computer manufacturer has manually enabled hibernation
    with the powercfg -h on command. Please note that you should never use hibernation if Windows is installed on SSD - this can significantly decrease the lifetime of your drive.

    The quickest way to disable both Fast Startup and hibernation is to right-click Start menu or use the keyboard shortcut Windows Key+X to open the Quick Links menu, choose Command Prompt (Admin), type powercfg -h off and press Enter. Please note that Windows 10 must be running normally or in Safe Mode for this to work. You cannot disable hibernation or Fast Startup in Windows RE.

    To resolve the Fast Startup issue while keeping hibernation on, open Control Panel in Windows 10. Type "power" into the search box and click Choose what the power buttons do. Alternatively, use the keyboard shortcut Windows Key+X to open the Quick Links menu and choose Power Options from there.

    In the Define power buttons and turn on password protection window, click Change settings that are currently unavailable.
    Windows 8, Control Panel, Define power buttons and turn on password protection. Click 'Change settings that are currently unavailable'.

    Then, in the Shutdown settings section, clear the Turn on fast startup (recommended) checkbox and click the Save changes button.
    Windows 8, Control Panel, Define power buttons and turn on password protection, Shutdown settings. Clear the 'Turn on fast start-up' check box on multi-boot systems.

    The same setting is also often responsible for the dreaded "The drive where Windows is installed is locked" errors: after shutdown, hiberfil.sys file contains kernel session and Windows prevents any modifications to the file system to prevent possible errors. See more information about safe and unsafe fixes for hibernation-locked drives.
  • Windows 10 is unable to boot from a GPT drive on UEFI-enabled devices - if you formatted or converted your system drive from MBR partitioning to GPT, you must ensure the EFI boot options state "UEFI only". Windows 10 require UEFI for GPT drives, this is a must and there is no workaround.

    In the old BIOS mode, Windows 10 will not detect your GPT hard drives or partitions correctly. No booting, no Reset this PC until "UEFI only" is set.

    You can easily verify whether UEFI works correctly by opening Troubleshoot and Advanced Options in Windows 10 Advanced Startup screen. If "UEFI only" is set, you'll see the UEFI Firmware Settings option listed.
    Windows 10, Advanced Startup Screen, Troubleshoot, Advanced Options. If EFI boot options are set correctly, there is the UEFI Firmware Settings option available.
  • "The drive where Windows is installed is locked. Unlock the drive and try again" and "Unable to reset this PC. A required drive partition is missing" errors while resetting Windows 10 installation, and error code 0xc000000e "A required device isn't connected or can't be accessed" while booting.
    1. Try a cold boot. Shut down your device, remove the power cord and battery (if available) and wait for about 20 seconds. Then connect the battery and power cord and try booting again.
    2. These errors often indicate that the file system or boot data configuration is corrupt. See how to fix errors on drives or rebuild boot information for Windows 10.
    3. Hibernation/Fast startup is another cause for locked drives in Windows 10. Restarts do not cause this error (no hibernation file is created then), but during the shutdown, a hibernation-enabled device saves the kernel session to a file named hiberfil.sys and prevents any further modifications to the file system to keep everything intact.
      To prevent such problems, open elevated Command Prompt, type powercfg -h off, and press Enter. This disables hibernation and fast startup/fast boot.
      See more information about safe and unsafe fixes for hibernation-locked drives.
    4. In some cases, Windows forgets the proper drive/partition order and tries to load files from the wrong one. Again, power off your computer and remove the power cord. Then disconnect cables from all hard drives except the one where Windows 10 resides, re-connect the power cord and see if the boot process completes properly now.
    5. If Windows 10 still works somewhat, try upgrading storage drivers and software using Intel's Driver Update Utility or find the driver software from AMD's site. Also, check if your device manufacturer has some driver update tool available.
  • Unmountable boot volume error (Blue Screen of Death) while starting Windows 10.
    1. If your device has multiple hard drives (including external USB drives!), power it off and disconnect the power cord. Then disconnect drive cables from all hard disks other than the one where Windows 10 is installed. Plug the power cord back in and see if this helps Windows to boot properly.
    2. Enter BIOS/UEFI and set your disk controller mode (aka SATA mode, RAID mode) to Standard (aka Standard IDE or SATA, Legacy) instead of AHCI or RAID (take note of the original setting first!). If this one fails, try other options until Windows starts properly.
    3. Run a RAM check to verify that memory modules are working correctly. If errors are detected, reseat memory modules and re-run the check. If the tests fail repeatedly, replace or remove the faulty module(s).
    4. Verify that hard drive/SSD SATA or IDE cables are seated properly. Unplug the cables and reseat them properly. Remove excessive dust with compressed air if necessary.
    5. Enter Recovery Environment, run Automatic Repair, and then open Command Prompt to run chkdsk.
  • Errors 0xc000021a and 0xc0000001 after installing latest updates for Windows 10. The most common cause is file system corruption, use Command Prompt to run chkdsk.
    If the error still appears after disk checks, open Command Prompt again and run DISM to revert pending actions. If DISM does not help, it is time to run chkdsk with the /R switch to verify that there are no bad clusters on your SSD or hard drive - if there are, the drive must be replaced ASAP.
    Windows 10, BSOD, Error 0xc000021a, Your PC ran into a problem and needs to restart. Windows 10, Recovery, Error code 0xc0000001, Your PC could not start properly. Press ESC key to open Windows Recovery Environment.
  • Errors 0xc000021a and 0xc0000001 without installing updates for Windows. First, if you used System Restore and Windows 10 did not boot after this, see this fix for error 0xc000021a.
    If your computer has a separate partition/volume or a (micro) SSD for Intel Smart Response Technology (SRT), it might have become corrupted. Enter your device's BIOS/UEFI and change your disk controller mode from Intel SRT to SATA or AHCI. Intel Smart Response Technology might also be a separate setting in the BIOS/UEFI setup, please consult your device manual on how to disable this feature. Most manuals are also available online at the manufacturer's support site.
    Also, please do not forget to run chkdsk with the /R switch - bad clusters are often the root of all evil.

Getting into Windows 10 Recovery Environment without an installation media

The good old F8 key trick for getting into Advanced Boot Options does not work since Windows 8, but it can still be enabled manually in case of an emergency.

Click or touch here to see instructions on booting to Recovery Environment with Windows 10 installation media or Recovery Drive/System Repair Disc instead.

If Windows is unable to start several times in a row, you can get into the Startup Settings menu after Windows detects it failed to start: click or tap the See advanced repair options button in the Recovery screen, or if Automatic Repair fails, click or touch Advanced options.
Windows 10, Automatic Repair, Your PC did not start correctly. Click 'Advanced options' to access troubleshooting options.

If Windows 10 crashes right or shortly after signing in, you can still reboot into Recovery Environment before logging in: press a key or click to remove the Lock screen, then click or tap the Power button on the bottom right (the rightmost button), hold down the Shift key and choose Restart. This will take you to the Windows 10 Advanced Startup menu (aka Choose an option).

If Windows 10 is able to start and run, open the Start menu. The fastest way is to click Power and then hold down the Shift key while clicking or tapping Restart. This will reboot right into Windows 10 Advanced Startup screen/menu.
Windows 10, Start menu. Click 'Power', hold down SHIFT key and click Restart to access Advanced Startup screen.

The longer way is to click or touch Settings instead. The modern Settings app can also be invoked with keyboard shortcut Windows Key+I.
In the Settings app, click or tap Update & Security.
Windows 10, Start menu. Click 'Settings'. Windows 10, Settings app. Click or touch 'Update & security'.

Next, open the Recovery tab from the left, find the Advanced startup section, and click or tap Restart now.
Please note that the Go back to an earlier build section is available only if you upgraded from an older version of Windows (including older builds of Win 10) within the last 30 days.
Windows 10, Settings, Update & security, Recovery tab. Click 'Restart now' in the Advanced startup section to access troubleshooting tools.

This is how Windows 10 Advanced startup screen looks like. Click or tap Troubleshoot.
Windows 10, Advanced startup, Choose an option. Click or touch Troubleshoot.

Jump to the Troubleshooting steps to take in Windows 10 Recovery Environment section to continue.

Booting to Recovery Environment with Windows 10 installation media or Recovery Drive/System Repair Disc

If UEFI has been configured correctly, you can see the Use a device option in Windows 10's Advanced Startup menu. To get to the menu from Windows 10, click Power and then hold down the Shift key while clicking or tapping Restart.
You can do the same even without signing in: press a key or click to remove the Lock screen, then do the Power button and Shift key magic as described above.
Windows 10, Start menu. Click 'Power', hold down SHIFT key and click Restart to access Advanced Startup screen.

Here's a screenshot of the Use a device entry. After selecting this option, you'll see a list of usable devices, choose the correct boot media: for USB drives, it is usually the USB HDD.
Windows 10, Advanced Startup menu. To boot a UEFI device from a USB drive or a DVD, choose the 'Use a device' option. Then select the correct entry from the list - USB drives are commonly referred to as 'USB HDD'.

Alternatively, if your device does not use UEFI and/or BIOS is not set to start from CD/DVD or USB drive read about changing the boot order.

In case of UEFI boot, look for Boot Order/Boot Priority tab or page and move CD/DVD and/or USB drive above Windows Boot Manager entry to be able to boot from media other than hard drive/SSD. You also have to connect your USB drive or insert CD/DVD before entering the UEFI/BIOS Setup.
In some cases, you might have to disable the Secure Boot option in UEFI/BIOS setup to boot from a USB stick or a CD/DVD.

On some Asus and HP devices, you may also need to set Launch CSM or CSM to Enabled - this turns on the Legacy/non-UEFI boot mode.

Always take note of original settings and remember to change them back after troubleshooting.

Flash drive users, please note: plug your bootable USB drive into a USB 2.0 or 1.0/1.1 port instead of a USB 3.0/3.1 (either blue in color, or has "SS" or "SuperSpeed" written near it) port if you encounter the dreaded and misleading "The requested system device cannot be found" errors here and there.

After you boot your PC using Windows DVD or System Repair Disc, a black screen appears with the gray text "Press any key to boot from CD or DVD". Press some key on your keyboard (Space and Enter are the most common ones) within 5 seconds to launch Windows from the disc.
This screen will not appear while booting from USB Recovery Drive.
Windows 10 boot from CD/DVD. Press any key within 5 seconds.

Windows will then load some files from the disc or drive, this takes some time.

In case you booted from Windows 10 Recovery Drive or System Repair Disc, Choose your keyboard layout screen appears. Click or touch your keyboard layout, or if one is not visible, use the See more keyboard layouts link until you see the correct layout.
Windows 10, Recovery Drive or System Repair Disc, Choose your keyboard layout. Click the correct layout or use the 'See more keyboard layouts' link to find one.

If using Windows 10 installation media, the Windows Setup dialog appears. Select your preferred settings from Time and currency format and Keyboard or input method combo boxes.
Leave the Language to install to "English" here to better understand this article.

Click Next to continue.
Windows 10, boot from installation media, Windows Setup. Select your preferences from 'Time and currency format' and 'Keyboard or input method' boxes. Then click Next.

Windows installation media users will then see a big tempting Install now button. Do not click it! Click Repair your computer in the lower-left corner instead.
Windows 10 installation media, Windows Setup. Click 'Repair your computer' to launch troubleshooting tools.

BitLocker-encrypted system drives (the drive where Windows is installed) must be unlocked first. If your device does not do this automatically using its TPM chip (startup PIN or password entry is required), you can find your BitLocker Recovery Keys at https://onedrive.live.com/RecoveryKey (you have to sign in with your Microsoft/Windows Live/Hotmail account).
If you have a USB key for BitLocker, insert it instead.

Choose an option screen then appears. Click Troubleshoot.
Windows 10, Advanced startup, Choose an option. Click or touch Troubleshoot.

Let's see an overview of the tools next.

Troubleshooting steps to take in Windows 10 Recovery Environment (RE)

Please note that if you are using the wrong media here - e.g. Windows 8 or 8.1 installation media on a Windows 10 device, or 32-bit version of Recovery Drive/System Repair Disc on 64-bit Windows - you can use the Command Prompt option only to run chkdsk/file system check.

While the other options are not disabled in the list, using these end with error messages and might damage your broken Windows installation even more.

Step 1 - Automatic Repair and Startup Repair in Windows 10

Unless you already started Windows 10 Recovery Environment from a failed Automatic Repair attempt, the very first option to try when Windows does not boot is the Automatic Repair or Startup Repair. This option will check the condition of your hard disk and see if files needed to launch Windows are present. The process takes from a few seconds to several hours, depending on the problem.

Automatic Repair/Startup Repair can also be used to fix Boot Configuration Data issues (for example, the 0xc000000f "The Boot Configuration Data for your PC is missing or contains errors" and 0xc0000034 "Boot Configuration Data file missing required information" errors).

To access the option, click or tap Advanced options in the Troubleshoot screen.
Windows 10, Advanced startup, Troubleshoot. Click 'Advanced options' to see the list of troubleshooting tools.

In the Advanced Options screen, click or touch Automatic Repair or Startup Repair.
Windows 10 Recovery Environment, Troubleshoot, Advanced Options. Click 'Startup Repair' to have Windows 10 look for essential fixes.

In case you started Windows RE while Windows 10 was running, your device restarts. After this, you need to sign in with the account that has administrative rights.

If you boot your device from Windows installation media or Recovery Drive/System Repair Disc, choose the correct target operating system. In most cases, you should have only one Windows 10 installation visible.
Windows 10 Recovery Environment, Startup Repair, Choose a target operating system. Click or touch the correct Windows 10 installation.

Windows 10 Startup Repair/Automatic Repair will first look for problems on a hard drive or SSD file system. Usually, this takes a few minutes, but if repairs are required, the process might last up to several hours. Never reboot your device during this process!

Next, other essential areas are diagnosed. This step might take up to 15-20 minutes.
Windows 10 Recovery Environment, Startup Repair, Diagnosing your PC. Please wait until the process is complete.

If fixes were successful, your device will restart automatically after the Attempting repairs step.
Windows 10 Startup Repair, Attempting repairs. Stand by until your device reboots.

In case Startup or Automatic Repair was unable to fix problems, click Advanced options to access other Windows 10 recovery tools.
Windows 10, Startup Repair couldn't repair your PC. Click 'Advanced options' to see other recovery options.

Step 1.1 (optional) - use Command Prompt for fixing disk errors, restoring missing system files, reverting pending updates, or preventing Automatic Repair from launching in Windows 10

To fix file system errors in Windows 10 Recovery Environment, click or tap Command Prompt in the Advanced options screen.
This step can also help in case of BSOD error 0xc000021a that appears after installing the latest updates - the most common cause for this is file system corruption.
Windows 10 Recovery Environment, Troubleshoot, Advanced options. Click 'Command Prompt' to try fixing file system errors with ChkDsk.

In case you started Windows RE while Windows 10 was running, your device restarts. After this, you need to sign in with the account that has administrative rights.

If you boot your device from Windows installation media or Recovery Drive/System Repair Disc, choose the correct Win10 operating system from the list. In most cases, you should have only one Windows 10 installation visible.

A black Command Prompt window opens on the drive with letter X. This is a special temporary drive created entirely in the Random Access Memory (RAM) of your device. No hard disk space is used for this drive.

Type echo list volume | diskpart and press Enter. This will display all drives/volumes/partitions available. You must use this command to verify that no partition/volume is listed as having the RAW file system type.
Windows 10 Recovery Environment, Command Prompt. To list all drives, type 'echo list volume | diskpart' and press Enter.

If even one volume shows up as "RAW" in Fs (File System) column, you must run chkdsk on it first and take note of the results.

Do note that third-party drive encryption tools (such as VeraCrypt) can also make the file system appear as RAW. This means that you must first decrypt the drive or partition/volume in order to fix it.

Ignore all volumes that have "CD-ROM" written in the Type column. Windows 10 installation media created with the Media Creation Tool always has the ESD-ISO label - ignore these.

The volume that has "System Rese" (part of "System Reserved") written in the Label column is the recovery partition, and it typically has drive letter C in the Ltr column. Such partitions are usually small in size - about 350 to 1000 megabytes (MB). You should always check this partition/drive for errors because normally Boot Configuration Data (BCD) is stored there.
Please note that not all computers have the recovery partition.

To confirm the drive letter of the system drive, type bcdedit | find /i "OSDEVICE" and press ENTER.
This outputs something like osdevice partition=E: where the very last letter is your Windows/system drive letter.
It might be some other letter in your case.
Windows 10 Recovery Environment, Command Prompt. To verify system drive letter, type 'bcdedit | find /i "OSDEVICE"' and press Enter.

Now type chkdsk <the drive letter>: /F /X and press Enter. Replace <the drive letter> with the letter of the drive where Windows is installed (or the drive that has RAW file system), for example, chkdsk e: /F /X or chkdsk d: /F /X. Note the colon after a drive letter.
This command will find and repair errors on the partition/volume (the /F switch) and if required, unmount it first (the /X switch).

If you want to run a full disk check with recovering data from unreadable clusters, use the chkdsk <the drive letter>: /R /X command instead. This is a must in case of repeating error 0xc000021a. Such an exhaustive test might take from a few hours to tens of hours to complete, depending on the condition of the drive.
Windows 10 Recovery Environment, Command Prompt. To check and repair the disk, type 'chkdsk <drive letter>: /F /X' and press Enter.

After the check completes, verify that there is a line stating "Windows has scanned the file system and found no problems" in the report.
If there were errors on the volume, repeat the last command (press Arrow Up key once to recall the last command) until the no problems message appears.

Ignore failure messages about event log: this is because logs are not available in Recovery Environment.
Windows 10 Recovery Environment, Command Prompt, Chkdsk. No problems were detected.

In case you see several errors about bad clusters during the check, the drive is about to fail completely. Backup your files either by using Puppy Linux or by putting the faulty drive in an external drive enclosure/another PC (the latter is for experts only).

Please check other volumes/partitions, especially the 350-1000 MB "System Rese" one for errors, too. If you have more than one hard drive or SSD installed, do not forget to run a disk check on these - this might solve your problems.

After chkdsk repairs file system errors on all volumes, close Command Prompt by clicking the X mark on the top right. Click or tap Continue in the Choose an option screen to try starting Windows 10 normally and see if the problem has been solved.

If no errors were found on listed volumes, keep reading for other solutions.

Chkdsk and disk read error c0000185 on a RAW file system

If a volume or partition was listed as RAW in diskpart output and you see the "A disk read error occurred c0000185" message before chkdsk completes, you might need to either reseat or replace the hard drive/SSD cable on your desktop or laptop computer. Turn off the device, disconnect the power cord (and battery on laptops), then unplug and replug the SATA cable both on the motherboard side and hard drive/SSD side. This method does not apply to tablets.

If your device case is very dusty inside, clean it with compressed air before reseating or replacing the cable.

Another method that works surprisingly often in this case, is resetting BIOS/UEFI to defaults. Reboot your Windows 10 device and press F1, F2, F10, F12, or DEL (aka DELETE) key to enter BIOS/UEFI setup (the correct key is usually displayed on screen first).
On some devices, you might have to press the ESC key to see the options list.

Find and launch the option that is similar to "Restore defaults" or "Load defaults". Intel motherboards have the F9 key for this purpose.

Please note that you might encounter the "Windows failed to start, File: \Boot\BCD, Status: 0xc000000f, Info: The Boot Configuration Data for your PC is missing or contains errors" screen after resetting BIOS to defaults. This can be easily fixed with Automatic Repair/Startup Repair or bootrec as shown here.

If reseating/replacing SATA cable and resetting BIOS/UEFI to defaults does not help, run Memtest86+ to verify that RAM modules are working correctly. If a RAM module has errors, remove or replace it before taking any further actions.

Recover missing or corrupted system files with SFC in Windows 10 RE

Next, try restoring missing system files using the SFC (System File Checker) tool. This is useful in cases where Windows 10 boots up, but all you see is a black screen with the mouse pointer, and keyboard shortcut Ctrl+Alt+Del does nothing.

First, run the bcdedit | find /i "OSDEVICE" command to find out the drive letter for the system drive (the partition/volume where Windows is installed). Note the drive letter on the right of the output: for example, D: or E:.
Windows 10 Recovery Environment, Command Prompt. To verify system drive letter, type 'bcdedit | find /i "OSDEVICE"' and press Enter.

Type sfc /scannow /offbootdir=C:\ /offwindir=D:\Windows\
Replace D: with the correct drive letter to the system drive. "Windows" is the default folder name for a Windows 10 installation.
Windows 10 Recovery Environment, Command Prompt. To repair or restore missing system files, type 'sfc /scannow /offbootdir=C:\ /offwindir=D:\Windows' and press Enter.

Fix error 0xc000021a with DISM in Windows 10 RE

If the disk check did not resolve error 0xc000021a in Windows 10, you need to revert pending updates using DISM.

First, check the letter for the drive where Windows is installed using the bcdedit | find /i "OSDEVICE" command. The correct letter is listed on the right, for example, D: or E:.
Windows 10 Recovery Environment, Command Prompt. To verify system drive letter, type 'bcdedit | find /i "OSDEVICE"' and press Enter.

Type dism /image:D:\ /cleanup-image /revertpendingactions (replace D:\ with the correct drive letter for your Windows drive) and press Enter. Ignore any error messages about scratch directory size.
Windows 10 Recovery Environment, Command Prompt. Type 'dism /image:D:\ /cleanup-image /revertpendingactions' and press Enter to cancel the installation of latest updates upon Windows startup.

Another reason for error 0xc000021a is often a corrupted micro SSD dedicated to Intel Smart Response Technology (aka Intel SRT). Enter your device's BIOS/UEFI setup and change your disk controller mode from Intel SRT to SATA or AHCI. Intel Smart Response Technology/SRT might also be a separate setting in BIOS/UEFI setup, please consult your device manual on how to completely disable this feature.

Please do not forget to run chkdsk with the /R switch if DISM did not help. For example, to fully check drive D:, type chkdsk D: /R /X. This exhaustive, several-hour test will check for bad clusters and try to recover data from those.

If there are bad clusters on the drive, you need to replace it as soon as possible - it can get only worse from here.

When the error still appears, you need to disable driver signature enforcement - this is a known issue with some Windows 10 versions after using System Restore.

One safe and one unsafe fix for the "drive where Windows is installed is locked" error (works ONLY when hibernation has been enabled in Windows 10)

If you cannot repair Windows 10 because of "The drive where Windows is installed is locked, Unlock the drive and try again" error, and you or someone else has turned on hibernation/fast startup/hybrid boot in Windows, there are two ways of working around it.

The safe option works only if Windows is able to boot normally or into Safe Mode. Open Start screen, type cmd, right-click the result, and choose Run as administrator. This will open the elevated Command Prompt.

Type powercfg -h off and press the Enter key. Restart your computer and retry whatever you were trying to do.
Windows 10, Command Prompt. To disable hibernation and Fast Boot, type 'powercfg -h off' and press Enter.

The second, unsafe option works even when Windows refuses to boot due to the "drive is locked" error. This is unsafe because it deletes the hiberfil.sys file that contains kernel session (used RAM and loaded drivers) from the last time Windows actually ran and was shut down.

Deleting this file might cause some minor problems if you last hibernated your device (instead of choosing Shut Down), but it might be the only way to continue troubleshooting.
A side note: if you are lucky, no problems appear at all.

In Command Prompt, type bcdedit | find /i "OSDEVICE" and press ENTER.
This outputs something like osdevice partition=E: where the very last letter followed by a colon is the Windows/system drive letter. It might be some other letter in your case.
Windows 10 Recovery Environment, Command Prompt. To verify system drive letter, type 'bcdedit | find /i "OSDEVICE"' and press Enter.

Type dir <Windows/system drive letter from previous step>:\ /ah , for example dir E:\ /ah and press Enter. This lists all files with the "Hidden" attribute in the root folder of the system drive.

Verify that hiberfil.sys is listed. If not, then make sure you used the correct drive letter. When the drive letter really is correct, hibernation is not enabled and there is no point in continuing with this solution.
Windows 10, Command Prompt. To check if a hibernation file exists, type 'dir C:\ /ah' and press Enter. Then see if a file named 'hiberfil.sys' is listed.

If the file is there, count your prayers, type del <Windows/system drive letter>:\hiberfil.sys /ah, for example, del E:\hiberfil.sys /ah and press Enter.

Close Command Prompt and retry booting Windows. You might encounter a few errors, but if Windows starts, you've resolved the dreaded "drive is locked" error. Please do follow the first, safe solution of running powercfg -h off to prevent the same error from appearing again.

Disable the Automatic Repair loop in Windows 10

If your Windows 10 device is stuck in the Automatic Repair loop, try disabling the feature via Command Prompt. This does not usually resolve problems, but you might see a full error message that helps in troubleshooting startup issues.

Type bcdedit /set {default} recoveryenabled NO and press Enter key.
Windows 10 Recovery Environment, Command Prompt. To disable Automatic Repair completely, type 'bcdedit /set {default} recoveryenabled NO' and press Enter.

If the message reads "The operation completed successfully", then Automatic Repair is completely turned off until you re-enable it with the bcdedit /set {default} recoveryenabled YES command in Command Prompt of Recovery Environment or an elevated Command Prompt while Windows is running (use WINDOW KEY+X to open Quick Links menu and click Command Prompt (Admin)).

Temporarily enable the F8 key for getting into the Advanced Boot Options menu of Windows 10

Because Windows 10 has no support for the F8 key by default, you might be unable to get into Safe Mode or Low-resolution video mode for troubleshooting unless Windows starts properly. Also, the Secure Boot option in the UEFI setup might prevent booting from non-approved USB drives and CDs/DVDs (you can try turning this option off). Somehow, Microsoft couldn't foresee this vicious circle happening to many users.

Luckily, you can enable the good old trick in the Command Prompt window described in Step 1.1 above. Please note that legacy boot options should not be turned on forever because they can cause trouble with UEFI systems. This is just a temporary workaround.

In the black Command Prompt window, type bcdedit /set {default} bootmenupolicy legacy and press Enter key. You should see the "The operation completed successfully" message after this.
Windows 10 Recovery Environment, Command Prompt. Turn on old boot options by typing 'bcdedit /set {default} bootmenupolicy legacy' and pressing Enter key.

Close the Command Prompt window and restart your computer. Pressing the F8 key repeatedly before Windows 10 starts loading should now bring up the older Advanced Boot Options menu.
Windows 10, legacy Advanced Boot Options menu accessible with F8 key.

To revert to the default boot menu policy in Windows 10, open elevated Command Prompt while Windows is running (use Window Key+X to open Quick Links menu and click Command Prompt (Admin)).
You can also boot from Windows 10 installation media or System Repair Disc/Recovery Drive and open Command Prompt in Recovery Environment.

Type bcdedit /set {default} bootmenupolicy standard and press Enter key.

Close the Command Prompt window and reboot the device. Now your computer uses the Modern UI boot options again.

Repair Windows 10 Boot Configuration Data with bootrec and bcdboot (please read the warning first!)

If Windows 10 BCD (Boot Configuration Data) becomes corrupt after a crash, power outage, or some other reason, you'll encounter the "The drive where Windows is installed is locked. Unlock the drive and try again" and "Unable to reset this PC. A required drive partition is missing." errors while resetting Windows 10 installation, and errors with codes 0xc000000e "A required device isn't connected or can't be accessed", 0xc0000001 "A required device isn't connected or can't be accessed", 0xc000000f "The Boot Configuration Data for your PC is missing or contains errors" or 0xc0000034 "Boot Configuration Data file missing required information" while booting.

If you boot from a USB installation media not created by Microsoft's default tool, you need to make sure that the boot type is the same as your device's current boot type. For example, free Rufus allows creating Windows 10 media in either MBR (aka BIOS/Legacy/CSM) or UEFI mode. The Automatic Repair function and bootrec commands will always fail in the wrong boot mode.

If you do not see the errors listed in bold above, but the "The drive where Windows is installed is locked. Unlock the drive and try again" error persists, please see the One safe and one unsafe fix for the "drive where Windows is installed is locked" error section above.

Please note that all partitions must be listed as NTFS or FAT32 in Fs column of echo list volume | diskpart results, otherwise there is no point in running the following commands. If you run the following commands on the RAW file system, you might kill boot sector data and end up with a computer that is unrepairable! Sure signs of a completely messed up drive are errors "The first NTFS boot sector is unreadable or corrupt" and "Unable to determine volume version and state. CHKDSK aborted." while running a disk check.

Please note that third-party disk encryption (such as VeraCrypt) can also make the file system appear as RAW. This means that you must decrypt the drive or partition/volume first.

If you came here from another website, then please note that bootrec is only available in Windows RE (Recovery Environment), not while Windows is running normally: please read the Booting to Recovery Environment with Windows 10 installation media or Recovery Drive/System Repair Disc section if Windows is not able to boot and run normally, or the Getting into Recovery Environment in Windows 10 without installation media section if Windows starts and runs properly (you are probably here to resolve the Windows 10 installation failing at 24% trouble).

This is your final warning: you must type echo list volume | diskpart, press the Enter key, and verify that no volumes have RAW listed in the Fs column before trying the bootrec commands. In case even one volume or partition is listed as RAW, stop now and see how chkdsk results can sometimes reveal the cause for Windows partition listed as RAW.

Did you actually read the warning above and verified volume file system types? Then type the following commands and press Enter after each one:

  • bootrec /fixmbr (not necessary if your device is in the UEFI mode)
  • bootrec /fixboot
  • bootrec /rebuildbcd

If you see a prompt to add one or more detected Windows installations after the last command, press A and then Enter on the keyboard. This means that BCD has been fixed successfully: close Command Prompt and restart your PC.
If bootrec detects a previous Windows installation in the folder named Windows.old, please press N - this is not the correct one.
Windows 10 Recovery Environment, Command Prompt. Fix Boot Configuration Data by entering the 'bootrec /fixmbr', 'bootrec /fixboot' and 'bootrec /rebuildbcd' commands.

In case the rebuildbcd command results in "The requested system device cannot be found" error, you probably have plugged your bootable USB drive into a USB 3.0/3.1 port (color blue, or "SS/SuperSpeed" written near it). Shut down your computer, plug your drive into a USB 2.0 port and retry.
Another possible cause for the error is booting in the wrong mode: your boot media must boot in the same mode as your Windows installation. This means either UEFI or Legacy (aka BIOS or CSM) mode. While Microsoft's default Create Windows 10 installation media tool seems to detect the mode properly, many free alternatives make you choose a fixed boot mode for the USB drive.

But in many cases, the bootrec /rebuildbcd command results either in 0 total identified Windows installations, or it detects an old Windows installation (in case you recently upgraded from an older version of Windows or updated Windows 10 version).

To resolve this problem, you first need to locate the drive where the Windows Boot Manager resides. In Command Prompt window, type bcdedit and press Enter. Locate the section Windows Boot Manager (usually the very first one with identifier {bootmgr}) and see its second line, device. Also, do take note of the device and path contents in the Windows Boot Loader section: these two combined reveal the full path to your device's Windows installation folder and boot loader file. This might come in handy a bit later on.

In the first example, the device line in the Windows Boot Manager section reads "partition=C:", meaning that Windows Boot Manager is on the partition/volume with drive letter C. The drive letter might be something different in your case. This also means that this device uses Legacy (aka BIOS firmware type or MBR) boot - in UEFI boot mode, Windows Boot Manager has no drive letter assigned.
The second and third lines in the Windows Boot Loader section reveal that Windows is currently on the drive with letter E and that the full path to the Windows installation folder is E:\Windows\. You need to combine only the drive letter and colon from the device line and the first folder between backslashes from the path line.

In the second example, the device line in the Windows Boot Manager section does not have a drive letter, but a WMI/COM path to the hard disk volume. As the path line reveals, this device uses the EFI/UEFI boot mode/firmware type: note that the boot manager file is called bootmgfw.efi and it resides in the EFI folder. The missing drive letter means that you should first assign a letter to the UEFI volume/partition, this is described a bit later.
The Windows Boot Loader section reveals that Windows is currently on the drive with the letter C, and the full path to the Windows installation folder is C:\Windows\. Again, you need to combine only the drive letter and colon from the device line and the first folder between backslashes from the path line.
Windows 10 Recovery Environment, Command Prompt, device with BIOS/MBR boot. To locate Windows Boot Manager and Boot Loader, type 'bcdedit' and press Enter key. The 'device' lines in the two first sections reveal correct drive letters for bootmgr and boot loader. Windows 10 Recovery Environment, Command Prompt, device with UEFI boot. To locate Windows Boot Manager and Boot Loader, type 'bcdedit' and press Enter key. The 'device' lines in the two first sections reveal correct drive letters or paths to bootmgr and boot loader.

Rebuilding Boot Configuration Data in Legacy boot (BIOS firmware type/MBR) mode of Windows 10

Run the following commands in case your PC is in Legacy boot mode (uses BIOS firmware type). If necessary, replace the drive letter "C" with the previously detected drive letter in the first two commands.
If the first command fails with "Path not found" error, your PC is not in legacy boot mode, or you used a wrong drive letter. Do not worry, try the UEFI boot mode commands instead, or double-check the drive letter from the bcdedit output.

  • cd /d C:\Boot\ (if this command fails, your PC is probably in UEFI boot mode)
  • attrib BCD -h -r -s (removes hidden, read-only and system attributes from BCD folder)
  • ren BCD BCD.old (renames BCD folder to BCD.old)
  • bootrec /rebuildbcd (retries the rebuild)

Windows 10 Recovery Environment, Command Prompt. Rebuild BCD by entering the 'attrib C:\Boot\BCD -h -r -s', 'ren C:\Boot\BCD BCD.old' and 'bootrec /rebuildbcd' commands.

Now, in the Add installation to boot list line, type A and press ENTER. The new BCD is ready, close Command Prompt, and restart your computer.

Rebuilding Boot Configuration Data in UEFI boot mode of Windows 10

If using the UEFI boot mode or firmware type, use the following commands instead:

  • diskpart (opens Disk Partitioning tool)
  • select disk 0
  • list volume (please note the number of the volume that has no drive letter assigned and has FAT32 listed in Fs column, usually the only FAT32 volume/partition)
  • select volume <the number of 100-500 MB FAT32 volume with no drive letter, or with label ESP, EFI or SYSTEM>
  • assign letter=Z: (gives drive letter Z: to EFI System Partition)
  • exit (closes Disk Partitioning tool)
  • cd /d Z:\EFI\Microsoft\Boot\ (changes the current folder in Command Prompt window)
  • attrib Z:\EFI\Microsoft\Boot\BCD -h -r -s (removes hidden, read-only and system attributes from BCD folder)
  • ren Z:\EFI\Microsoft\Boot\BCD BCD.old (renames BCD folder to BCD.old)
  • bootrec /rebuildbcd (retries the rebuild)

In the Add installation to boot list line, type A and press Enter. The new BCD is ready, close Command Prompt, and restart your device.

Creating a new Boot Configuration Data store in Windows 10 if the previous bootrec steps failed

If renaming the BCD folder still did not work, the last resort is to look up Windows Boot Manager and Windows Boot Loader drive letters and paths from the bcdedit command output as shown earlier.
In case your device is in UEFI boot mode, the Boot Manager drive letter is still the same Z: you assigned earlier with diskpart.

Check and double-check the Windows Boot Manager drive letter and the full path to the Windows installation folder. If necessary, just run the bcdedit command again.

Enter the following command: bcdboot <the full Windows installation path> /s <the drive letter for Windows Boot Manager or UEFI partition>: /f ALL , for example: bcdboot E:\Windows /s C: /f ALL (Legacy boot) or bcdboot C:\Windows /s Z: /f ALL (UEFI boot).
Windows 10 Recovery Environment, Command Prompt, Legacy boot mode. Create a new boot configuration data entry by running the 'bcdboot e:\windows /s C: /f ALL' command.

If the command displays the "Boot files successfully created" result, everything is fine now. You can restart your device.

The bcdboot command created a new BCD store with the Windows installation path, copied critical boot files to Windows Boot Manager or UEFI partition (the /s switch), and enabled all boot modes/firmware types (the /f ALL switch).

Step 1.2 - workaround for error 0xc000021a with Windows 10 RE after using System Restore

There is a known problem with some versions of Windows 10 that could invoke boot error 0xc000021a after running System Restore.

To work around this error, choose Startup settings from the Advanced Options screen. After your device reboots, choose the Disable driver signature enforcement option by pressing the 7 or F7 key.
Windows 10, Advanced startup, Startup Settings, Press a number to choose from the options below. Press F7 key to disable driver signature enforcement.

Let the boot process continue and Windows 10 should start normally.

Step 2 - System Restore in Windows 10 RE

The next step is to try System Restore from the Advanced Options screen. This works only while using the correct Windows installation media or Recovery Drive/System Repair Disc.
Using Windows 7/8/8.1 install or recovery media on a Windows 10 installation (or vice versa) ends with an error message about no available Restore Points.

This is the recommended way of running System Restore in Windows 10 - doing this while Windows is running could end with boot error 0xc000021a. The workaround is described in the previous section.

System Restore will literally turn back time for your PC: while your documents and files will always remain intact, all programs or drivers installed after the selected Restore Point might disappear and must be reinstalled. Also, if you changed your Local Account password recently, it might be reverted to the previous one by the selected Restore Point.

Please note that this System Restore cannot be undone, but you can still restore another Restore Point later.
Windows 10 Recovery Environment, Troubleshoot, Advanced options. Click 'System Restore' to try reverting recent changes.

In case you started Windows RE while Windows was running, your device restarts. After this, you need to sign in with the account that has administrative rights.

If you booted your device from Windows installation media or Recovery Drive/System Repair Disc, choose a target operating system by clicking on its button. In most cases, you should have only one Windows 10 installation visible.

Read detailed instructions on using System Restore in this article.

Move on to the next page of this article to read about completely restoring your Windows 10 device from a backup, using the Reset this PC and Recover from a drive features, or performing a clean install of Windows 10.


 

Ctrl+F searches in the contents







Next: Repair your computer in Windows 10, page 2
Previous: Restore Windows RE in Windows 7, 8, 8.1 and 10