How do I upgrade to the latest version of my distribution? (e.g. Ubuntu 16.04/CentOS 7)

Linode Staff

I am running an old version of my distribution and I'd like to upgrade it to the most recent. How can I do this?

1 Reply

Upgrading your distribution can be a daunting task. Because of breaking changes in between major release versions of most distributions, lots of things can break and the process is not always smooth. The best way to upgrade to the latest version of your operating system would be to create a new deployment, and then copy your data over. Specifically, you can follow these steps:

  • From the Linode's dashboard, follow the 'Deploy an image' link. From this form, deploy a new Linode with the distribution you want to upgrade to.
  • This will create a new disk, and it will also create a new configuration profile which boots into that disk. Configuration profiles are how you can control which disks and options your Linode boots with: Disk Images and Configuration Profiles
  • From the Linode's dashboard, click the Edit link for the new configuration profile. In this form, scroll down to the Block Device Assignment section. Here, set /dev/sdc to be your previous/old disk. This will allow you to later mount this disk and copy data off of it.
  • Save this change, and then reboot your Linode into the new profile.
  • Once your Linode has booted, login via SSH and install all the services you need. Also, be sure to review the security of your deployment and applications: Securing Your Server
  • After you have finished installing your services, mount your old disk: mount /dev/sdc
  • Your old files will then be listed under the /media/sdc directory, and you can copy them to your new environment using the cp command.

Note:

If your Linode does not have enough space for the new deployment along with your old one, you may have to shrink your old disk. You can resize the disk with this guide here. If you would prefer to upgrade your Linode instead, you can do so with this guide here.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct