How to Upgrade to Ubuntu 18.04 LTS (Bionic Beaver)
Updated by Edward Angert Written by Linode
Ubuntu 18.04 is a Long-Term Support (LTS) release that will be supported by Canonical until April 2023. This guide shows how to upgrade your Linode from Ubuntu 16.04 (Xenial Xerus) or Ubuntu 17.10 (Artful Aardvark) to Ubuntu 18.04 (Bionic Beaver).
CautionDistribution upgrades sometimes yield unpredictable results. If possible, use these steps as an alternative to the upgrade method described in this guide:
- Create a new Linode with the latest disk template
- Rebuild your stack
- Transfer your data
- Swap IP addresses
The upgrade may be incomplete or your system may be corrupted if your internet connection is interrupted. Use Lish or Glish to perform this upgrade in a stable environment that does not rely on an active internet connection to your Linode.
NoteIf you are upgrading from Ubuntu 17.04 you must first upgrade to Ubuntu 17.10.
Prepare to Upgrade to Ubuntu 18.04
The steps required in this guide require root privileges. Be sure to run the steps below as root or with the sudo
prefix. For more information on privileges see our Users and Groups guide.
In order to prepare your Linode for upgrade, the following steps will:
Install updates for Ubuntu 16.04.
Backup your data.
Ensure that the kernel version you’re using is the latest.
Stop non-critical services.
Start a LISH session to ensure that the installation is not interrupted.
Install Available Updates
Update package lists and install all updates:
apt update && apt upgrade
Back Up Your Linode
It’s a good idea to back up your Linode before performing a major upgrade. That way, you can restore from backup if anything goes wrong during the upgrade process. If you subscribe to the Linode Backup Service, we recommend that you take a manual snapshot before upgrading to Ubuntu 18.04 LTS. If you use another backup service or application, we recommend that you make a manual backup before continuing.
Check Your Kernel
Verify that your Linode is using the latest supported kernel. See Applying Kernel Updates for more information.
Stop Services
We recommend that you stop as many services as possible before upgrading to Ubuntu 18.04 LTS. This includes web server daemons (Apache and NGINX), database servers (PostgreSQL and MySQL), and any other non-critical services.
Get a list of services currently running on your system:
systemctl | grep running
To stop a service, enter the following command, replacing
apache2
with the name of the service you want to stop:systemctl stop apache2
You are now ready to install Ubuntu 18.04 LTS on your Linode.
Upgrade from Ubuntu 16.04 LTS to Ubuntu 18.04 LTS
Remember to perform these steps in a Lish or Glish session:
Install the
update-manager-core
package:apt install update-manager-core
Open
/etc/update-manager/release-upgrades
and verify that thePrompt
value is set tolts
on Ubuntu 16.04 ornormal
on Ubuntu 17.10:- /etc/update-manager/release-upgrades
-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Default behavior for the release upgrader. [DEFAULT] # Default prompting behavior, valid options: # # never - Never check for a new release. # normal - Check to see if a new release is available. If more than one new # release is found, the release upgrader will attempt to upgrade to # the release that immediately succeeds the currently-running # release. # lts - Check to see if a new LTS release is available. The upgrader # will attempt to upgrade to the first LTS release available after # the currently-running one. Note that this option should not be # used if the currently-running release is not itself an LTS # release, since in that case the upgrader won't be able to # determine if a newer release is available. Prompt=lts
You’re now ready to begin the upgrade to Ubuntu 18.04 LTS.
do-release-upgrade
Follow the on-screen instructions to complete the installation process.
Because Linode offers internal package mirrors for Ubuntu, you may see some combination of the following messages:
No valid mirror found
While scanning your repository information no mirror entry for the upgrade was found. This can happen if you run an internal mirror or if the mirror information is out of date. Do you want to rewrite your 'sources.list' file anyway? If you choose 'Yes' here it will update all 'trusty' to 'xenial' entries. If you select 'No' the upgrade will cancel. Continue [yN]
Type
y
and Enter to continue.Packages no longer supported
3 installed packages are no longer supported by Canonical. You can still get support from the community. 2 packages are going to be removed. 91 new packages are going to be installed. 346 packages are going to be upgraded. You have to download a total of 239 M. This download will take about 30 minutes with a 1Mbit DSL connection and about 9 hours with a 56k modem. Fetching and installing the upgrade can take several hours. Once the download has finished, the process cannot be canceled. Continue [yN] Details [d]
Press
d
for more details (thenq
to exit the details), ory
to continue.Configuring openssh-server: Press enter to choose
keep the local version currently installed
.Remove obsolete packages?: Enter
y
The upgrade will require a reboot. Enter
y
to continue:System upgrade is complete. Restart required To finish the upgrade, a restart is required. If you select 'y' the system will be restarted. Continue [yN]
Once the system has rebooted, verify that it’s running Ubuntu 18.04:
lsb_release -a
You should see output that resembles the following:
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04 LTS Release: 18.04 Codename: bionic
Your Linode is now running Ubuntu 18.04 LTS.
Upgrading from Previous Ubuntu Releases
If your Linode is running a release of Ubuntu older than 16.04 LTS, use the upgrade guides in the Upgrading section to upgrade to Ubuntu 16.04 LTS first. You may then upgrade your Linode to Ubuntu 18.04 LTS.
Join our Community
Find answers, ask questions, and help others.
This guide is published under a CC BY-ND 4.0 license.