# My hard drive is locked and wont unlock



## JoshuaBouv (May 29, 2016)

Hey,

Just want to start off with saying I have read another similar post on this site which can be found here: http://www.techsupportforum.com/for...epair-this-computer-automatically-768938.html

It was promising as the poster was having the exact same errors as me fro the people recommending fixes as me but in the end it turned out he jut had a faulty piece of software. This is what I have done so fa an had no luck with.

I was running windows 10 but im currently running it from a USB stick.

So I was able to stick a memory stick in my PC hoping to reinstall windows on my second hard dive, but I noticed that my first hard drive wasn't dead after all as it wasn't letting me re format hard drive #2 for what ever reasons so I started browsing the tools.

I have gone through countless forums and tried all of this:

A lot of the forums recommended doing these commands, I got to the last one and it always said this:









I also tried resetting my PC. When I choose to reset my PC but keep the files it says 








And with deletng the files









Ive also tried running *chkdsk C: /f /r /x* and the result was 









Though I was able to browse through all the folders on my disk









The latest downloaded thing on the machine was a game, otherwise nothing before that.

Massive thanks in advance,
Josh


----------



## spunk.funk (May 13, 2010)

You can mark the Windows Partition as Active using *DiskPart*:
http://www.thewindowsclub.com/the-drive-where-windows-is-installed-is-locked
If the drive is Marked as_ Read Only_ then you will need to *Clear the Attribute*: 
Windows boot drive is locked, unlock drive [Solved] - Windows - Windows 8


----------



## JoshuaBouv (May 29, 2016)

Hey,

Thanks for the response.

I followed the 2 links and the first link took me to a place where I had already been. I followed through with it again and got this error code:










The image is a bit rubbish but it says "*The selected disk is not a fixed MBR disk. The ACTIVE command can only be used on fixed MBR disks.*

So I tried another on another partition to be sure, same response.










So I moved onto the second link, a site which I hadn't seen before and got an intresting result. So the disk doesn't seem to be read only, but when I was trying to check the attributes of the volume, one seems to be missingish.









Here you can see that it says
*Virtual Disk Service error:
The object is not found.*









So I tried another volume, but it came back with a normal response.









Hoping you can make a bit more sense out of this than I can,

Thanks,
Josh


----------



## spunk.funk (May 13, 2010)

First off remove all external USB Mass Storage devices like HDD's etc only have the USB Windows Install Flash Drive. If you can unplug the secondary HDD that will also help, as all you want to do is concentrate on the Internal *C:* Drive.
The only Partition you want to Select in Diskpart is the one that says *Primary* or *System* whichever is the largest partition and not Reserved or Recovery. 
Under *List Volume*, you only want to select *Disk 1* that is Drive *C:* Formatted *NTFS *and is healthy. 
You do _not _want to select a Volume that is Hidden, or is Formatted FAT32. If it says the drive is *USB*, then that is your USB Flash drive with the Windows install on it, don't select that.


----------



## JoshuaBouv (May 29, 2016)

Hey,

Thanks for the response again.

Something I forgot to mention in the original post is that it wont boot without the USB.

It show's this.










Blurry image again but it say's *"Reboot and Select proper boot device or Insert Boot Media in selected boot device and press a key."*

I unplugged the second hard drive though and did the same thing. I checked the disks, there was the main Hard drive with the OS on (which is what windows say's is locked/missing a partition) and the USB.










I selected the hard drive and choose the volume which wasn't hidden and was NFTS, which was volume 1 in this case. I then did active and got the same results as last time. *(The selected disk is not a fixed MBR disk)*











I did also try the USB just to see what it said, and it said the same thing.

I think im missing something so sorry for the bouncing thread.

Thanks,
Josh

*Edit: Just noticed I did it for the USB instead of the hard drive at first, oops, but also did it with the hard drive selected and got the exact same results)*


----------



## spunk.funk (May 13, 2010)

OK you have selected the correct Volume, *Volume 1 *which is the *C* _Ltr_ (drive letter) 
Now type 
diskpart>* attrib volume *If it is ReadOnly type
DISKPART>* attributes volume clear readonly*
If this fails, type 
*List Partition
Select Partition *[partition #]
* attrib Partition
*If it is ReadOnly type
*attributes partition clear readonly
*If all of this fails, you may need to wipe the drive and reinstall Windows.


----------



## JoshuaBouv (May 29, 2016)

Hey again,

Tried following the instructions but it doesn't seem to be showing the attribute of rather partition, but the disk says it is not read only.

Thanks,
Josh 
(Done from phone so not sure if the picture will show correctly)


----------



## spunk.funk (May 13, 2010)

You shook the phone when you took this picture so it is blurry, I can't read the outcome the attributes for the partitions?
If the Disk, Volume and Partition are not ReadOnly then the drive is not recoverable. Backup any files you want to keep under your User File, Steam, Frapps etc, to a USB HDD.
Boot off the Windows disc and choose *Custom Install*, then go to *Drive Options* and delete all partitions, and go next, Windows will create partitions and Format them NTFS during the install. Restore your backup. 
If if it doesn't list the drive to install Windows, run the *Clean* command from Diskpart. 
iii) *select disk* <disk number> 
*clean *(this erases all data on the Disk, so be sure you choose the correct one)

The HDD will now be listed in Windows Custom Install/Drive Options as *Unallocated Space*, click next and Window will create partitions and install Windows.


----------



## JoshuaBouv (May 29, 2016)

Hey,

Thought that this would be the case, thanks for trying though 

I'll mark this as solved and hope you have a great day 

Also thanks for the advice about the deleting the partitions , was just about to ask about that

Thanks again,
Josh


----------



## JoshuaBouv (May 29, 2016)

-snip- fixed now


----------



## spunk.funk (May 13, 2010)

> If if it doesn't list the drive to install Windows, run the *Clean* command from Diskpart.
> iii) *select disk* <disk number>
> *clean *(this erases all data on the Disk, so be sure you choose the correct one)
> 
> The HDD will now be listed in Windows Custom Install/Drive Options as *Unallocated Space*, click next and Window will create partitions and install Windows.


----------

