AWS Troubleshooting – How to Revert the OS to Last Known Configuration

Brief:

It can harm your AWS operating system if you try to change the registry or anything related to the AWS configurations. The AWS instance OS does not provide the option for System Restore, which we have in the personal Windows OS.

This post explains how you can revert the OS of the AWS instance.

How It Works:

Please ensure you create an AMI or snapshot of the root volume before proceeding to revert the OS back to the last known good configuration. Please follow the steps below:

1. Create another temporary instance in the same availability zone. Please ensure it is 2008 R2 or higher.

2. Stop the impaired instance.

3. Detach the root volume of the impaired instance.

4. Attach the root volume to the temporary instance.

5. In case you do not see the new volume, please open "diskmgmt.msc" (disk management console) to bring the volume online.

6. Open regedit and select HKEY_LOCAL_MACHINE folder.

7. Go to File > select "Load hives".

8. On the second volume, browse the folder containing the hives, usually the path is [SecondDrive:]\Windows\System32\Config and select System.

9. You will be prompted with a dialog box to name the hive. You can choose any name you like for the hive.

10. Once the offline hive is loaded, please open the new imported system hive.

11. Click on the "Select" folder, inside the select folder there will be four (4) keys. ( Current, Default, Failed, LastKnownGood ).

12. Edit the 4 keys inside that folder and add 1 to the current value in that key. i.e: if the current value is 1 replace it with 2. Please ensure you edit all 4 keys.

13. Then go to the offline folder again, hit file and select unload hive.

14. Bring the attached volume offline from the diskmgmt.exe console.

15. Attach the root volume to the original instance and launch the instance.

Podcast

Michael Patterson sat down with the CEO of Boston Byte, Mustapha Shaikh to discuss the significance and rapid digitization of the healthcar...