Locked out from EC2 Ubuntu

0

Hello all I installed gnome graphical interface on my ubuntu EC2. since then when the server restarted it doesnt allow ssh remote logins. I tried to access it via the serial console but still no luck. i get a black screen - rarely i get a login prompt but doesnt get further after i enter the username

I suspect the issue is that the system is not fully booting as it goes to the graphical UI and the services have not started hence ssh is not up.

the system log from instance troubleshooting menu lists this:

M [ * ] Job systemd-networkd-wait-online.se…ice/start running (34s / no limit)

M [ * ] Job systemd-networkd-wait-online.se…ice/start running (35s / no limit)

M [ *] Job systemd-networkd-wait-online.se…ice/start running (35s / no limit)

M [ ] Job systemd-networkd-wait-online.se…ice/start running (36s / no limit)

M [ *] Job systemd-networkd-wait-online.se…ice/start running (36s / no limit)

M [ ] Job systemd-networkd-wait-online.se…ice/start running (37s / no limit)

When i try to see an instance screenshot of the server.. sometimes it shows the ubuntu gnome login screen othertimes it shows a blank screen

How do i get into the system?

thanks

asked a month ago26 views
2 Answers
0

It appears you're facing a challenging situation with your EC2 Ubuntu instance after installing the GNOME graphical interface. The symptoms you're describing suggest that the system is indeed having trouble fully booting, which is preventing SSH access and causing issues with the serial console.

To address this problem, you can try the following steps:

  1. Use the EC2 Serial Console to access your instance's GRUB menu. During the boot process, you should be able to interrupt it and access the GRUB menu.

  2. From the GRUB menu, try booting into single user mode or emergency mode. To do this, edit the kernel line in the GRUB menu and add either "single" for single user mode or "emergency" for emergency mode at the end of the line.

  3. Once in single user or emergency mode, you should have command-line access to your system. From here, you can troubleshoot the issue, such as disabling the graphical interface or fixing any configuration problems that might be preventing normal boot.

  4. If you're unable to access the GRUB menu or single user mode, you might need to use more advanced recovery methods. One option is to use the AWSSupport-TroubleshootRDP automation document, which can help diagnose and fix various issues, even though it's primarily designed for Windows instances.

  5. Another option is to use the AWSSupport-ResetAccess runbook. This automation can help you regain access to your instance by creating a new SSH key.

  6. If all else fails, you might need to consider detaching the root volume from the problematic instance, attaching it to a new instance as a secondary volume, and then making the necessary changes to fix the boot issues.

Remember, it's crucial to have proper backups before attempting any significant changes to your instance configuration. If you're not comfortable with these procedures, it might be wise to consult with an AWS support professional or an experienced system administrator.

Sources
Troubleshoot your Amazon EC2 instance using the EC2 Serial Console - Amazon Elastic Compute Cloud
EC2 Serial Console for instances - Amazon Elastic Compute Cloud
Reset passwords and SSH keys on EC2 instances - AWS Systems Manager

profile picture
answered a month ago
0

how do i interupt it ? :

*Use the EC2 Serial Console to access your instance's GRUB menu. During the boot process, you should be able to interrupt it and access the GRUB menu. *

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions