New app - BootNext - boot any device or OS from Windows 8/7/Vista

New version - Dual-boot Repair Tool for Windows 8.1 Update

How to fix:

"The drive where Windows is installed is locked. Unlock the drive and try again."


Brief description what caused the error (if not interested skip to "repair steps"):

Installed new version of Ubuntu 12.04 and Virtual Box in a dual boot with Windows 7.
Wanted to try if a Windows 8 installation to VHD could be run by Virtual Box on Ubuntu.

Created a new virtual machine with the VHD in question in Virtual Box and started it.
No luck. My processor did not have VT-x.

So rebooted my computer and selected Windows 8 just to check if the VHD is still intact.
Was greeted with the error message:

"The drive where Windows is installed is locked. Unlock the drive and try again."


Repair steps:

Booted my Windows 8 Install USB and started Recovery console.

1) First thing I tried was to check if VHD has still a correct disk structure using chkdsk.
chkdsk v: /R ( VHD was mapped to v: )

No errors - everything was fine.

The error was showing pretty early before appearance of the "running circle" when booting Windows 8 so the problem was in winload.exe or the very first system files loaded by winload.exe. (Winload.exe is Windows loader for Vista and later versions and is the first file loaded and executed by Windows boot manager after you select to load Vista/7/8 OS from boot-menu.)

After spending some time on several forums it appeared that the error message in question was reported in connection with error code 0xC0000098.

The message for error code 0xC0000098 is
"The volume for a file has been externally altered such that the opened file is no longer valid."

Attaching Windows 8 VHD to Virtual Box and starting it had as result that some file needed for starting up the system was altered by Virtual Box and left in an inconsistent state.

2) For repairing boot environment files Microsoft delivers the utility bcdboot.
bcdboot is known to fix BCD errors but it also recreates the whole \boot folder, fixes bootmgr and winload.exe (and some other boot related files new in Windows 8)

Executed a simple command:
bcdboot v:\Windows /s v: - (attached VHD was mapped to drive v:)

When using this command and having several Windows Vista/7/8 installations in dual or multi boot you should always choose the latest Windows version as parameter to the command because from this source (v:\Windows) the system protected boot related files are taken and installed to the system partition (active partition) if no /s parameter is specified.

That was it.
Rebooted and SUCCESS !



There was a small drawback however after using bcdboot - the "Repair your computer" in advanced boot options on F8 key for the repaired loader (and boot menu entry) was missing but that was easy to solve with just two commands on command prompt (from a running Windows 8 VHD system in my case):

ReAgentC /disable
ReAgentC /enable

And everything was as it was before going into trouble..



It should be mentioned that if a system file needed for starting up the system is tampered

sfc /scannow

should fix the issue - at least Windows should be able to start in safe mode where you could do more comfortable further investigations what is causing the problem if it still persists.

Next would be to check integrity of drivers, anti-virus program (switching it on or off ) and so on the chain of loaded programs.

A start-up with boot logging would also be helpful as it would record the last loaded file at error point..


Hope this helps.


Copyright © 2014 BoYans