AWS Rescue Instance with a Desktop
Cloud Tech
How to create an AWS Rescue Instance with a Desktop. In this video I take you step by step in creating an AWS EC2 Ubuntu Rescue Instance, with a Desktop, so its able to run GUI based utilities like GParted, and how i access it from my Windows PC using the already installed Remote Connection Software using the RDP protocol. I then use it to fix, a non booting, and completely full other Instance.
Timestamps 0.00 YouTube Intro & Video Purpose 1.15 The 5 Steps 2.29 Step 1. Building the Rescue Instance 4.52 Step 2. Configure the Rescue System 9.30 Step 3. Attach the Faulty boot disk 12.20 Step 4. Fix the disk 16.10 Step 5. Re-attach to the Main Instance 12.42 YouTube End Card Scene
NOTES
Step 1. Building the Rescue Instance Ubuntu 18.04 instance using SSH key - Port 22 & 3389 open
Step 2. Configure the Rescue System
Convert AWS provided .pem SSH key, to .ppk new format using PuttyGen
Use user ubuntu which is the default AWS userid for this image
Then in the Putty SSH Client, run the following commands :
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install xfce4 firefox xrdp testdisk qdirstat
sudo apt-get install gparted gpart xfsprogs xfsdump
sudo echo xfce4-session [GREATER THAN SYMBOL HERE]~/.xsession
sudo passwd root ( password : {paste @s7u4tp6y3e5t9r6n3# })
sudo reboot
to confirm all the confiuration has worked, connect via RDP
Close RDP connection to finish this step
Step 3. Attach the Faulty boot disk a) stop rescue instance, b) explain i have faulty boot drive, but rescue disk in different availabity zone c) goto volumes, create snapshot of faulty disk d) go to new snapshot, create a new volume in rescue instances availability zone e) attach new volume to rescue instance as device /dev/sdf f) start rescue instance
Step 4. Fix the disk Run Windows Remote Desktop Connection use Rescue Instance IP, Userid = root & Password Each case will be unique However in the video: a) Check the GUI utilility Gparted sees partions etc b) in terminal , run "df" c) in file manager in directory /etc/network - rename interfaces to interfaces.old - rename interfases.bak to interfaces d) run qdirstat delete any big , unneeded file(s) e) in terminal , run "shutdown" (will take 60-90 seconds)
- Step 5. Re-attach to the Main Instance In effect, this is step 3 in reverse. a) Goto volumes, create Snapshot called "Fixed disk" of fixed rescue disk b) Goto Snapshots tab, select snapshot "fix
113657574 Bytes