This topic describes the causes of and solutions to the issue that the "no bootable device" error message appears when you start a Windows Elastic Compute Service (ECS) instance.
Problem description
A Windows ECS instance cannot be started, and the "no bootable device" error message appears.
If the operating system fails to start, you can connect to the instance by using only Virtual Network Computing (VNC).

Causes
The preceding issue may occur due to several reasons. You can use the instance health diagnostics feature to identify the cause and select a solution based on the cause. The following table describes the possible causes and the corresponding solutions.
Cause | Solution |
The disk adapter driver is not installed in the image file. | |
An exception occurs on an upper-layer disk filter driver (UpperFilter) of the instance. As a result, the disk cannot be identified. | |
The system partition of the instance is marked as Inactive. | |
The essential files in the system partition of the instance are corrupted, and the boot mode configuration is invalid. | |
The disk space allocated to the system partition of the instance is too small (less than 100 MB) | The issue occurs when an instance is created from a custom image and cannot be started due to an image issue. In this case, you must re-create an image and use the image to replace the operating system of the instance. For more information, see Create Windows image files and Replace the operating system (system disk) of an instance. |
The system partition on the system disk of the instance does not exist. | |
The type of the file system corresponding to the system partition of the instance is incorrect. |
Solutions
Install a disk adapter driver
Install a disk adapter driver on the instance to which a repair disk is attached. Perform the following steps:
Connect to the faulty instance.
On the Diagnostic Result page, click VNC Connection. Then, enter the Administrator username and password provided in the diagnostic report to log on to the ECS instance to which a repair disk is attached. For more information, see Connect to an instance by using VNC.
Select one of the following methods to install the disk adapter driver.
For example, the letter of the mounted drive is D and the driver file is located in the
C:\Driversdirectory. Run one of the following commands to install the disk adapter driver:Dism:
dism.exe /image:D:\ /Add-Driver /Driver:C:\Drivers /recurse.PowerShell:
Add-WindowsDriver -Path D:\ -Driver C:\Drivers -Recurse.
On the Instance page, move the pointer over the Repairing state that corresponds to the instance and click Detach Repair Disk.
Restart the instance to allow the preceding configurations to take effect.
For more information, see Restart an instance.
Connect to the ECS instance. If you can connect to the ECS instance as expected, the preceding issue is resolved.
For more information, see Use Workbench to connect to a Windows instance over RDP.
Remove residual entries for the Windows disk filter driver
Solution 1: Reinstall the filter driver
We recommend that you contact the filter driver vendor to obtain the instructions for installing the filter driver.
Solution 2: Delete the residual entries from the registry
Delete the residual entries from the registry of the instance to which a repair disk is attached. Perform the following steps.
Registry modifications may affect the stability and security of the operating system. Proceed with caution. We recommended that you back up your current registry settings before you modify the registry. This way, you can restore registry settings based on your business requirements.
Connect to the faulty instance.
On the Diagnostic Result page, click VNC Connection. Then, enter the Administrator username and password provided in the diagnostic report to log on to the ECS instance to which a repair disk is attached. For more information, see Connect to an instance by using VNC.
In the Run dialog box, enter
regeditand click OK to open the Registry Editor.In the Registry Editor window, select
HKEY_LOCAL_MACHINE. In the top navigation bar, choose to load an offline registry hive. Navigate toD:\Windows\System32\config\SYSTEMand click Open. When you are prompted to enter a key name, enterOfflineSYSTEM.
Delete the residual value data of
UpperFilterfrom theHKEY_LOCAL_MACHINE\OfflineSYSTEM\ControlSet001\Control\Class\{4d36e967-e325-11ce-bfc1-08002be10318}registry. In this example, the value data istest_filter, as shown in the following figure.
On the Instance page, move the pointer over the Repairing state that corresponds to the instance and click Detach Repair Disk.
Start the ECS instance.
For more information, see Start an instance.
Connect to the ECS instance. If you can connect to the ECS instance as expected, the preceding issue is resolved.
For more information, see Use Workbench to connect to a Windows instance over RDP.
Set the system partition state to Active
Set the system partition state to Active for the instance to which a repair disk is attached.
Connect to the faulty instance.
On the Diagnostic Result page, click VNC Connection. Then, enter the Administrator username and password provided in the diagnostic report to log on to the ECS instance to which a repair disk is attached. For more information, see Connect to an instance by using VNC.
Set the system partition state to Active.
You can select one of the following methods based on your business requirements. In this example, the serial number of the disk on which the faulty operating system resides is 1 and the serial number of the system partition is 1.
Use DiskPart to resolve the issue
Open the
DiskPartwindow.Enter
diskpartin the search box in the lower-left corner of the desktop and press the Enter key, or enterWindows PowerShellin the search box and press the Enter key to open the DiskPart window and then run thediskpartcommand.Select the disk that you want to manage.
select disk 1Clear the read-only attribute of the disk.
attribute disk clear readonlySelect the system partition.
select partition 1Set the system partition state to Active.
active
Use a PowerShell command to resolve the issue
Set-Partition -DiskNumber 1 -PartitionNumber 1 -IsActive $trueOn the Instance page, move the pointer over the Repairing state that corresponds to the instance and click Detach Repair Disk.
Restart the instance to allow the preceding configurations to take effect.
For more information, see Restart an instance.
Connect to the ECS instance. If you can connect to the ECS instance as expected, the preceding issue is resolved.
For more information, see Use Workbench to connect to a Windows instance over RDP.
Reconfigure the boot mode of the Windows operating system
Reconfigure the boot mode of the Windows operating system of the faulty instance to which a repair disk is attached. In this example, the drive letter of the system partition is S, and the drive letter of the Windows partition is C.
Connect to the faulty instance.
On the Diagnostic Result page, click VNC Connection. Then, enter the Administrator username and password provided in the diagnostic report to log on to the ECS instance to which a repair disk is attached. For more information, see Connect to an instance by using VNC.
Enable Windows Preinstallation Environment (
WinPE) mode and use the BCDboot command line tool to run one of the following commands to reconfigure the boot mode:Unified Extensible Firmware Interface (UEFI) boot mode
bcdboot C:\Windows /s S: /f UEFIBasic input/output system (BIOS) boot mode
bcdboot C:\Windows /s S:
Run the following command to view the boot settings:
UEFI boot mode
bcdedit /store S:\EFI\Boot\BCDBIOS boot mode
bcdedit /store S:\Boot\BCD
The system returns the sample boot settings as shown in the following figure.

(Optional) If the D disk of the ECS instance also runs a Windows operating system, specify a boot mode for the Windows operating system.
UEFI boot mode
bcdboot D:\Windows /s S: /d /p /addlast /f UEFIBIOS boot mode
bcdboot D:\Windows /s S: /d /p /addlast