Disconnection After Upgrading Ubuntu Environment¶
Behavior on Older Ubuntu Environments¶
On some older Ubuntu-based environments, running the command sudo apt update
followed by sudo apt upgrade
causes the virtual machine to disconnect during the upgrade process.
Even after reconnecting to the virtual machine, many of the packages will remain outdated because the upgrade was not completed.
Below is a list of environments likely affected by this behavior. Please note that this issue has been fixed in any 2022.8 or newer revision of our Ubuntu environments.
- GNU-Radio TPMS
- Laboratory Exercise - Host Based Network Security Basics - Part-1 & Part-2
- Introduction to Forensics
- Ubuntu 20.04
- Ubuntu 20.04 Desktop and Ubuntu 20.04 Terminal
- Ubuntu 18.04 Desktop
- Ubuntu 18 LTS - XFCE
- Ubuntu 18 XFCE and Ubuntu 18 SSH
- Ubuntu with Snort and Other tools
If you are using one of these environments, and your environment is older than 2022.8, we have a workaround that will allow you to upgrade packages in our older Ubuntu environments.
Underlying Cause¶
During a package upgrade on certain Ubuntu virtual machines, one of the post-installation scripts for the ec2-hibinit-agent
package restarts systemd-logind
service. As a result, connection to the virtual machine will be dropped, and any open software will be killed.
Workaround to Allow Upgrades¶
Info
If you have already experienced a failed upgrade, this workaround will fix the problem, allowing you to upgrade packages. Alternatively, this can be used as a preventative measure to avoid an upgrade failure altogether.
To successfully upgrade the packages on older Ubuntu images, first run the following commands:
sudo sed -e '/restart\ systemd-logind.service/ s/^#*/#/' -i /var/lib/dpkg/info/ec2-hibinit-agent.p*
sudo apt -y remove ec2-hibinit-agent
This will permanently fix issues caused by this package and will allow you to upgrade your packages using the following commands:
sudo apt update
sudo apt upgrade
Have a Question? Contact Support¶
We're here to help you. If you still have questions after reviewing the information above, please feel free to submit a ticket with our Support Team and we'll get back to you as soon as possible.
Thank You for Your Feedback!