Sometimes installing Operating system ruins users into many problems. These problems are generated due to the unsuccessful installation of the Windows OS or due to disk errors. In many cases, we’ve found that Windows installation files are corrupted or not complete. This happens when user copy original Windows installation files to a duplicate CD/Pendrive and the transfer is unsuccessful. Many users are claiming that after installing Windows OS, they are getting the drive where Windows is installed is locked, unlock the drive and try again. Also, sometimes installing a bricked software or a virus attack might be the reason of this problem. They can hard your Windows system files and resulting in many problems like you’re facking one. The basic reason behind this error message is that your drive is locked and Windows OS can’t load from the partition.
Sometimes the attribute of the drive is set to read only by the virus or any program. This means your Operating System files can’t load from that drive resulting in this problem. If the BCD file (Boot COnfiguration Data) is damaged then you won’t be able to boot your Windows OS in any case. Many problems are generated due to corrupted/damaged BCD file. In this article, we’ll be showing you all the method using which you can solve “the drive where Windows is installed is locked, unlock the drive“.
We’ll be using Windows installation files here. If you get this error after installing the Windows, then it’s a must that you’ll have WIndows installation files. If you don’t have then make bootable Pendrive with Windows installation files in it or use CD containing the OS. We’ll be using Windows Recovery Environment here to solve this error.
Fix: The Drive Where Windows Is Installed Is Locked
Below are all fixes you should follow. These methods will surely fix your problem. If you’re having any error in following the steps, you should comment down below and we’ll be available for your help.
Sol:1 Running Automatic Repair In WinRE
For this method, we’ll be booting into the Windows Recovery Environment. We need Windows installation files as we listed above.
- Enter into the BOOT Menu and change the booting priority to the external CD/Pendrive where installation files are kept.
- Now, once you’ve booted into the Windows installation files, click on Repair Computer option.
- Click on Troubleshoot Option.
- Then select Advanced Option.
- Now, select the Automatic Repair option. This feature will repair all the Windows related problem automatically. If it worked for you, there’s no need to do further methods.
If you’re not able to run the automatic repair, don’t worry. There are still many methods left to solve the drive where Windows is installed is locked error.
As we listed above that this problem might occur due to the disk read-only attribute. Maybe you’ve accidentally set the read-only attribute to your drive using third party application or CMD or maybe this happens due to any virus. Then follow the fix we’ve shown below.
Sol 2: Changing Disk Attributes Using CMD In WinRE
We’re again using our Windows Recovery environment here. Without OS files, you won’t be able to fix this problem. You’ll have to use any third party tool to fix and those tools aren’t free. So, it’s wise to use Windows installation files for this purpose. Follow the method given below:
- Boot into the Windows installation CD/Pendrive and click on Repair Computer Option.
- Then select Troubleshoot>Advacned>Command Prompt.
- Command Prompt will appear now, you need to type the command now to check if your disk is locked or not.
- Type: diskpart and hit enter, then type list disk.
- This will show all the disks connected to your computer. Select your disk where Windows OS is installed. (Disk 0) So, type select disk 0 and hit enter.
- Then type: attributes disk and hit enter. If you get stats like given below then everything is OK and you need to skip to our 3rd Sol.
Current Read-Only State: No
This means your drive is Ok and there’s no read-only attribute. But if you get the following message then you need to clear the disk read-only attribute.
Current Read-Only State: Yes
- To clear these Read-Only attributes type: attributes disk clear readonly and hit enter.
- Your problem will be fixed now. Try boot into Windows OS. There’ll be no error like: the driver where Windows is installed is locked.
We hope your problem is now gone. If you were not able to clear the attributes or there were any errors while executing the command in the command prompt, you should run the CHKDSK scan. This can be easily done using the Command prompt like the way you’ve used in the method given above.
1. Open the command prompt in WinRE (Follow the steps given above).
2. Now, type: chkdsk C: /f /x /r and hit enter. Wait till the scan is complete. This scan will fix all the problems are related to your HDD/SSD.
Repair BCD (Boot Configuration Data)
Still in trouble! Well, you should now repair your BCD file. BCD stands for boot configuration data which is required by Windows OS to boot properly. All the booting-related information is solved in this file. If it’s corrupted/damaged then you need to repair it. Without this, you won’t be able to boot into Windows OS. You’ll get many errors including the drive where Windows is installed is locked.
- Boot into the Windows installation files and select Repair Computer Option.
- Now navigate to Troubleshoot > Advanced Options > Command Prompt.
- Type the command: bootrec /FixMbr
- Wait till the command is executed completely. YOu should also execute the commands given below:
bootrec /FixMbr bootrec /ScanOs bootrec /RebuildBcd
- Reboot your system and see if your problem is gone or not.
We hope your problem is now solved. If you’re still having the problem then you should try the clean installation of the Windows OS. Just format the drive where you’re installing the OS and then install Windows OS in it. Doing this will remove all the data from the partition and you’ll not get the drive where Windows is installed is locked error. Comment down below to get more help.