How to Upgrade Your Ubuntu Server Version over the Network and via the Terminal CodeUnit 20 JUL 2010

The nice thing about Canonical’s Ubuntu is that they have a nice and consistent major release cycle, making the management of your Ubuntu servers a pretty planned affair.

The question today is of course how to actually initiate a network upgrade on your terminal-only Ubuntu server once the time to upgrade finally rolls on by?

Well that actually depend on which version you are upgrading from and which version you are upgrading to!

So let’s do the most expected one for now: Upgrading your 9.10 Ubuntu Server (Karmic Koala) to 10.04 LTS (Lucid Lynx).

First, make sure you apply all updates to your current version (run sudo apt-get update to update your package sources and then sudo apt-get upgrade to update all the actual packages).

Next, install the update-manager-core if it isn’t already installed: sudo apt-get install update-manager-core.

Then edit /etc/update-manager/release-upgrades and set Prompt=normal.

Finally, launch the upgrade tool via sudo do-release-upgrade and then follow the on-screen instructions as the system pulls down all the necessary files over the network and attempts to upgrade your system.

Great.

If however you are upgrading from something slightly older like 8.04 LTS (Jaunty Jackalope) to 10.04 LTS (Lucid Lynx), you’ll have to do the following:

First, make sure you apply all updates to your current version (run sudo apt-get update to update your package sources and then sudo apt-get upgrade to update all the actual packages).

Next, install the update-manager-core if it isn’t already installed: sudo apt-get install update-manager-core.

Then edit /etc/update-manager/release-upgrades and set Prompt=lts.

Finally, launch the upgrade tool via sudo do-release-upgrade –devel-release and then follow the on-screen instructions as the system pulls down all the necessary files over the network and attempts to upgrade your system.

And that’s really all there is to it. Note that upgrading might take a while over a slow connection as there are a lot of files that need to be pulled down.

Also, if you want to see which version of Ubuntu Server you are currently running, this might be useful: cat /etc/lsb-release

Nifty, you should now be good to go! :)

Related Link: http://www.ubuntu.com/desktop/get-ubuntu/upgrade

About Craig Lotter

Software developer, husband and dad to two little girls. Writer behind An Exploring South African. I don't have time for myself any more.

  • Thanks for your guide.  I want to upgrade from 8.04 to 10.04 so I log in over SSH from another machine and proceed through all the steps until I get to “checking package manager” and then I get the following:

    Continue running under SSH?

    This session appears to be running under SSH.
    It is not recommended to perform an upgrade over SSH currently
    because in case of failure it is harder to recover.

    If you continue, an additional SSH daemon will be started at
    port ‘9004’.  Do you want to continue?

    Continue [yN]

    I have not proceeded past this step.  Are these steps for a direct connection to the server using a connected keyboard and monitor?

    Apart from doing the network upgrade I was wondering whether upgrading from 8.04 to 10.04 would be a good opportunity to do some spring cleaning with a clean install…

    • All good questions, which unfortunately I’m not experienced enough to attempt to answer! (Sorry about that – have only done this once, and that was a while ago. This post is more a case of saving the info for when I need to attempt this again in the future!)

      • I managed to sort it all out in the end using the Webmin interface and running the “do-release-upgrade” command from the Command Shell module.  That failed with “out of disk space” errors but I rebooted and did “aptitude update && aptitude safe-upgrade && aptitude dist-upgrade” to complete the process.  I had to manually install a couple of packages and click through dozens of “do you want to update this config file?” screens but it all worked after a couple of hours.  I had backups of everything just in case.
        I decided to upgrade over the network rather than a clean install as time is at a premium when there are two small children running around…Has the South Easter started blowing in GB?  It would be nice to back in CT as “summer” draws to a close in Scotland.

        • Excellent. Webmin really does make life for admins a lot easier. Don’t worry, I have a little one of my own, so I’m all to familiar with after hours work myself! :)