×


Boot an EC2 Windows instance into DSRM - How to perform this task

Are you trying to boot an EC2 Windows instance into DSRM? 

This guide will help you.


In some scenarios, if an instance running on the Microsoft Directory experiences a system failure or other critical issues then we can troubleshoot the instance by booting it into a Safe Mode called Directory Services Restore Mode(DSRM).

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform such AWS related queries.

In this context, we shall look into how to boot an EC2 Windows instance.


Boot an EC2 Windows instance into DSRM(Directory Services Restore Mode)

Enabling the DSRM and booting into the instance depends on the driver the instance is running. Driver versions like 'AWS PV 7.2.2 and later' and ‘Enhanced Networking’ support DSRM.

If the driver version is 'AWS PV 7.2.2 and later' and 'Enhanced Networking', to enable the DSRM, we need to first, detach the root volume. Then attach it to another instance and then enable the DSRM. 


How to Configure an instance to boot into DSRM ?

Since the EC2 Windows instances do not have network connectivity before the operating system is running, we can't press F8 button for booting. 

We can do it by following one of the below procedures.


1. Booting an online instance into DSRM using the System Configuration dialog box

i. First, we type MSConfig in the Run dialog box and press Enter.

ii. Next, we choose the Boot tab.

iii. After that, under Boot options, we choose Safe boot.

iv. Then we choose Active Directory repair and then choose OK. 

The system prompts us to reboot the server.


2. Booting an online instance into DSRM using the command line

From the Command Prompt window, we run the following command:

bcdedit /set safeboot dsrepair

If an instance is offline and unreachable, we can detach the root volume and attach it to another instance to enable DSRM mode.


3. Booting an offline instance into DSRM

i. First, we open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

ii. Next, in the navigation pane, we choose Instances.

iii. Then, we locate and select the affected instance and choose Instance state, Stop instance.

iv. After that, we choose Launch instances and create a temporary instance in the same Availability Zone as the affected instance. Then we choose an instance type that uses a different version of Windows.

v. In the navigation pane, we choose Volumes.

vi. We then locate the root volume of the affected instance. Then we detach the volume and attach it to the temporary instance we created earlier. After that, we attach it with the default device name.

vii. We use Remote Desktop to connect to the temporary instance, and then use the Disk Management utility to make the volume available for use.

viii. Then we open a command prompt and run the below command. Note: Replace D with the actual drive letter of the secondary volume just attached:

bcdedit /store D:\Boot\BCD /set {default} safeboot dsrepair

ix. In the Disk Management Utility, we choose the drive we attached earlier. Then we open the context (right-click) menu, and choose Offline.

x. In the EC2 console, detach the affected volume from the temporary instance and reattach it to your original instance with the device name /dev/sda1. You must specify this device name to designate the volume as a root volume.

xi. After that, we start the instance.

xii. Once the instance passes the health checks in the EC2 console, we connect to the instance using Remote Desktop and verify that it boots into DSRM mode.


[Need urgent assistance in booting the EC2 Windows instance? – We are here to help you. ]


Conclusion

This article covers how to boot an EC2 Windows instance into DSRM. If an instance running Microsoft Active Directory experiences a system failure or other critical issues you can troubleshoot the instance by booting into a special version of Safe Mode called Directory Services Restore Mode (DSRM). In DSRM you can repair or recover Active Directory.


How to Configure an Instance to Boot into DSRM?

1. To boot an online instance into DSRM using the System Configuration dialog box

i. In the Run dialog box, type msconfig and press Enter.

ii. Choose the Boot tab.

iii. Under Boot options choose Safe boot.

iv. Choose Active Directory repair and then choose OK. The system prompts you to reboot the server.


2. To boot an online instance into DSRM using the command line

From a Command Prompt window, run the following command:

$ bcdedit /set safeboot dsrepair

If an instance is offline and unreachable, you must detach the root volume and attach it to another instance to enable DSRM mode.