Windows 10 Boot Manager Fail (endless startup loop). Certain files are locked/cannot be deleted, restricting system restore. How to fix?

I am facing an issue with my Windows 10 on my laptop (Lenovo Y720 15-IKB). The boot manager does not start, there’s an endless loop of restarting and displaying the Lenovo screen again and again. To resolve this issue, I created a Windows 10 bootable USB to access repair tools etc. to see if they could help or not. I have already tried the following:

1) If I go to Startup Repair, it “logs” an error in the SrtTrail.txt file that there is a version mismatch and hence Startup Repair could not repair the PC. Most probably its because I had the latest Insider build installed and the bootable USB was of a slightly older version. I wonder if I can get a .iso of the latest build to resolve this issue.

2) If I go to “Reset” system, it says that the drive where Windows is installed is locked. Please “unlock” the drive and try again. How could I possibly unlock it, when it won’t even start. I can’t access the safe mode either.

3) I had created restore points earlier, to which I tried restoring to however, I received an error code 0x80070091. Afterwards I googled around and tried a few scripts (similar to those mentioned in this link https://www.easeus.com/backup-recovery/system-restore-failed-and-did-not-complete-successfully.html) and the error changed to “An unspecified error occurred during system restore (0x80070780)”.

4) I finally narrowed down the problem via Command Prompt (when starting using a bootable USB and going to command prompt) to certain files and folders which “can’t be deleted”. I tried pretty much all techniques I could think of. These files were in the folder “C:\Program Files\WindowsApps”, one of them belonged to MS Office and another related to Lenovo. I have tried the following:

  • Tried deleting the folder (and individual files), upon trying to delete a folder I get the message “The directory is not emply” and upon deleting a file I get “The file cannot be accessed by the system” and for other similar commands I also got an error saying “The file is being used by some other process”.
  • Tried renaming the folder
  • Tried changing access permissions (using takeown command etc. and retried the above)
  • Tried moving the folders to another drive so that System restore could work for the C: drive
  • Tried opening the folder etc. None of the above seems to work.

5) I have also tried “chkdsk” and “mbr” related repair strategies, none seem to work. Apparently, all is good based on the result of “Check Disk”.

Assuming a “Clean Install” is out of the question, what else could I do to repair / restore to a restore point?

Hi Mikaal,

Thank you for writing to Microsoft Community Forums.

To have better clarity on the issue, answer the below-listed questions and get back to us.

  1. Since when are you facing this issue?
  2. Did you make any changes to the computer prior to this issue?
  3. What is the error message that you get when trying to access the Safe Mode?
  4. Are you using BitLocker for your hard drive?

Try the below troubleshooting methods.

Before trying the below troubleshooting methods, unplug all the external devices from your computer expect the mouse and keyboard.

Method 1: Check your hard drive is set as Boot Device.

Sometimes, your hard drive isn't set as the boot device and if you have two or more hard drives, then you might have set the secondary hard drive as the boot device, so make sure to change this setting if it is changed in BIOS. To see how to do that, you need to check your motherboard manual for detailed instructions.

Method 2: Repair the Boot Configuration Data (BCD) File.

The error message 'Drive where Windows is installed is locked' may occur due to the corrupted the corrupted BCD file as well, so follow the below steps to repair the BCD file.

Step 1: Insert the Windows 10 bootable USB into the computer and boot from the USB.
Step 2: Open the Command Prompt from the bootable USB and type the following commands and hit Enter after each command:

  • Bootrec /FixMbr
  • Bootrec /FixBoot
  • Bootrec /ScanOS
  • Bootrec /RebuildBcd

Step 3: Once you have entered the above commands, enter the below command and hit Enter.

  • chkdsk /f /r

Important: While performing chkdsk on the hard drive, if any bad sectors are found on the hard drive then chkdsk tries to repair that sector, if any data available on that might be lost.

Step 4: Once the Check Disk command is executed successfully, your computer should restart, so remove the Windows Installation USB and let it boot from your hard drive.

If the above methods didn't work, the follow the Method 3 and see if this helps.

Method 3: Clearing the Volume.

Step 1: Insert the Windows 10 USB into the computer and go to Command Prompt and type the below command and hit Enter.

  • Diskpart
  • List Disk
  • Select volume (Select the disk number in which the operating system is installed).
  • att vol clear readonly

Step 2: Once you have executed all the above commands, restart your computer once and remove the Windows Installation USB and check for the issue.

Hope it helps.

Let us know if you got the help you needed by clicking Yes or No.

Best regards,
Shafeeq Ali Khan
Microsoft Community – Moderator

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Shafeeq,

Thank you for your response. 


I got this problem with my laptop around 15 days back, since then I have been using another one and tried fixing it multiple times.


Method 1)
I have already tried method 1. The boot disk is the laptop’s hard drive. However, like I mentioned, since the default boot manager takes the laptop into an endless startup loop, for debugging purposes I boot from a bootable USB and go to the repair options you get from the in bottom left side of the Install Windows 10 menu. And then I try all my fixes through the command prompt. After trying all fixes, when I try to boot from Hard Drive again, I get back into the endless startup loop.


Method 2)
I did previously try method 2, however, upon retrying it this time. Windows detected another windows installation in “C:\Windows.old\Windows” folder, usually this happens after a major update. Anyways, I added it to the Bcd using the next command.

Afterwards when I tried chkdsk /f /r, I got the following error:

The type of file system is NTFS. Cannot lock current drive. Windows cannot run disk checking on this volume because it is write protected.


Strangely enough "chkdsk /f /r" does not work, however "chkdsk C: /f /r" does work ("C: being my OS drive"), but even for the latter I get a message saying:

"Windows has scanned the file system and found no problems.
  .
  .
  .
Failed to transfer logged messages to the event log with status 50."

I'm guessing this is probably due to the same drive/file lock which is causing other problems.

Method 3)
I also tried method 3, however, it didn’t fix the problem either. I retried method 2 after trying method 3 as well (as suggested on some online forums), still to no effect.

The only difference that go made was that by method 1 I now have two operating systems listed instead of one (Windows 10 and Windows 10 Home), from which neither boot/work.


Anything else I could possibly do other than a clean re-install?

Regards,
Mikaal

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Mikaal,

Thank you for replying.

If the above methods are not working, then I would suggest you to do a Custom Installation, in which you will lose all of your applications/programs; however,  your user data like pictures, videos, documents, music files, etc., will be saved in Windows.old folder.

Hope it helps.

Let us know if you got the help you needed by clicking Yes or No.

Best regards,
Shafeeq Ali Khan
Microsoft Community – Moderator

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated January 28, 2024 Views 4,827 Applies to: