[Raw] EC2 - Recovery Instance

  • Stop Instance

  • Detach the root volume of your instance

  • Attach the volum to a rescue instance ( one which you can SSH in to). Make sure the rescue instance is in the same availability zone as your original instance.

  • Mount the root volume to a temporary mount point on the rescue instance For example: sudo mount /dev/xvdf1/mnt/recovery

  • You can see instance log messages under /mnt/recovery/var/log/ directory.

  • cd /mnt/recovery/var/log/

  • sudo cat boot.log

  • sudo cat messages

  • sudo cat dmesg

  • You can display current SSH settings

  • sudo cat /etc/ssh/sshd_config

  • sudo cat /etc/ssh/ssh_config

  • 1)To return the volume to the original instance

  • Unmount the volume.

  • sudo unmount /mnt/recovery

  • 2)Detach the volume from the recovery instance

  • 3) Remount the volume on the original instance as the root volume ( e.g /dev/sda1 )

  • 4) Start the instance

Last updated

Was this helpful?