I installed whereami on an Amazon EC2 Debian/Ubuntu Linux instance and can no longer connect to the instance.

The Debian version of whereami is designed to provide multiple network connectivity options for laptops or other portable devices capable of running Debian/Ubuntu Linux. The functionality of whereami for Debian-based Linux distributions is completely different from the functionality of whereami provided for Enterprise versions of Linux such as Red Hat Enterprise Linux, Amazon Linux, and enterprise versions of SuSe or Centos Linux. Attempted installation of the whereami package on an Amazon EC2 Debian/Ubuntu Linux instance will terminate any existing connection to the instance and cause all future connection attempts to fail.

Note
Attempts to install whereami on an Amazon EC2 Debian/Ubuntu Linux instance encounter problems running dpkg-reconfigure, causing the installation to hang and eventually fail.

Follow these steps to restore network connectivity to an Amazon EC2 Debian/Ubuntu Linux instance after attempting installation of the whereami package:

  1. Start an Amazon EC2 Linux ‘rescue’ instance with chroot installed.
  2. Stop the Debian/Ubuntu EC2 instance.
  3. Detach the root volume of the Debian/Ubuntu EC2 instance.
  4. Attach the root volume of the Debian/Ubuntu EC2 instance to the Amazon EC2 ‘rescue’ instance.
  5. Start the ‘rescue’ instance if it is not already started, and open a terminal session.
  6. Run the following command to mount the root volume from the Debian/Ubuntu instance to /mnt.
         sudo mount /dev/xvdf /mnt
  7. Run the following command to chroot into the root volume of the Debian/Ubuntu instance.
         chroot /mnt /bin/bash
  8. Run the following command to remove the whereami package from the Debian/Ubuntu instance.
         apt-get remove --purge whereami
  9. Run the following command to unmount the root volume of the Debian/Ubuntu instance and remove from the rescue instance.
         exit;umount /mnt;
  10. After the disk is unmounted, detach the root volume of the Debian/Ubuntu EC2 instance from the ‘rescue’ instance.
  11. Reattach the root volume of the Debian/Ubuntu EC2 instance.
  12. Start the Debian/Ubuntu EC2 instance. Network connectivity should be restored and connections to the instance should be successful.

Amazon EC2, Linux, Debian, Ubuntu, whereami, networking, lost connection, restore connectivity, chroot, mnt


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center.