[German]Some users are facing a bad surprise during re-installing Windows 8.1 or Windows 10 on a machine. Setup fails and reports a "locked hard disk". Here are a few hints, how to solve this issue.
Advertising
I've been confronted with this issue in Microsoft Answers since Windows 8. Users are receiving the Message (see here and here):
„The drive where Windows is installed is locked. Unlock the drive and try again."
Installing Windows isn't possible at this time. I guess, some failed updates, third party tools or other incidents left the hard disk in a wrong state. So we need a cure to fix that issue.
Fix #1: Reset BIOS-/CMOS to default
In some cases, wrong CMOS data prevents accessing a disk via BIOS (or UEFI) calls. So try to reset your UEFI / BIOS to factory defaults. Press a function key (F2, F8, F12 etc.) to enter BIOS- or UEFI setup and search the option to set the default values. Details may be found in the device's manual (see also this forum thread).
Also check your cables and disk configuration to avoid an improper setup. In case, that several disks are build in, remove all disks and use only the disk for the operating system install, to avoid conflicting hardware constellations.
Advertising
Check your disk drive
A damaged file system can result in a locked disk (see here). Open an administrative command prompt (see Windows 10: Open command prompt window as administrator) and enter the command:
chkdsk C: /f /r /x
In worst case, this command needs to be executed unter Windows PE (after booting from a recovery drive or system repair disk). Note that the drive with the Windows install has to be included within the obove command (I uses C: for instance).
Reset your hard disk's partitions
If a file system check doesn't fix the problem, try to unlock a logical volume on your hard disk. Boot Windows and got to an administrative command prompt window (see Windows 10: Open command prompt window as administrator). Enter the commands:
diskpart
list disk
select disk x
The letter x stands for the drive with Windows. After the disk has been selected in diskpart, list and check the logical partitions, using the commands below.
list partition
The command shall list the Windows install partition – otherwise the wrong disk has be selected in previous commands. Now you can check the drive's attributes:
attribut disk
The result shall show, whether the disk is write protect or not (see the following screen shot).
If a write protect is enlisted with „Yes", try the following command to reset write protection:
attributes disk clear readonly
This command will work only within Windows PE. Afterward boot the machine and try to run setup again. If the issue is still present, check all logical volumes for a write protection using the following commands.
select disk 0
list volume
select volume 2
The commands given above selects disk 0 and logical volume 2 – I assumed, Windows has been installed on logical volume 2. The use the command:
attributes volume clear readonly
to reset a write protection on a volume. I've tested it, it also works in an administrative command prompt windows.
It's also possible, that a missing active partition prevents Windows from booting. Use diskpart and the command active to set a partition as active.
Repair your boot configuration
Sometimes boot files or the BCD store is damaged and prevents installing Windows (see). Try to boot into Windows RE and use startup repair to fix the boot environment (see my blog post Windows 10 hangs with error code 0xc0000034. If that doesn't work, opens an administrative command prompt window and enter the following commands:
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
The 3rd command lists all installed Windows copies and the last command rebuild the BCD store (see also). In some cases, the command below, issued within a command prompt windows, the BCD store.
bcdboot C:\Windows /s C:
The command suppose that Windows is installed on logical drive C: – see this blog post (deleted) from Boyans.
Take care with Raid systems …
I've read several times, that drivers for raid systems are the cause for the hard disk lock issue.
Recovery or reformat your disk
If the fixes give above doesn't helps, try to reset your machine to factory settings, using the vendor's recovery solution (see your device's manual). Or delete the "system reserved" partition in setup wizard and install Windows on a free, non partitioned disk space.
Within the MS forum thread Windows crash – Refresh – Hard drive locked, unlock hard drive a damaged BCD entry may be repaired using the following commands in command prompt window:
BCDboot c:\windows /s c: /l en-us i
The options for BCDboot are discussed within this Technet article.
Error code 0xC0000001
If an error code 0xC0000001 has been reported? This MS Answers forum thread, and the articles here and here are discussing this issue. The proposal is to use the automatic Windows startup repair to fix that issue.
Similar articles
Win10 Wiki
Windows 10: Open command prompt window as administrator
Trick: How to upgrade to Windows 10 using a clean install
Microsoft Windows and Office ISO download tool
Windows 10 Version 1511 via Media Creation Tool "is back"
Advertising