How can I upgrade Ubuntu LTS to the next one offline?

I'm using Ubuntu 12.04 on my computer and I want to upgrade to Ubuntu 14.04. I do not have internet at home, so I need to do the upgrade offline. On openSUSE there a way to make the upgrade offline simple and effective way is by using the iso DVD. My question is: Is there any way to make Ubuntu upgrade offline as in openSUSE ?


Solution 1:

Canonical doesn't provide alternate-cd since 12.10, so an upgrade through the installation disk won't be available.

The solution would be to create an offline mirror of the ubuntu package repositories [1]. Once you have one, you can follow this procedure :

  • update-manager and do-release-upgrade reads the file /etc/update-manager/meta-release to find the location of the meta-release file. This points to the internet location changelogs.ubuntu.com normally. And if you just mirror the package repos, the meta-release file isn't included. So we need to fetch it first:

    wget http://changelogs.ubuntu.com/meta-release
    
  • Store it, for instance on the root of the internal mirror or some other convenient location, and put the url to it in the "URL" value in the /etc/update-manager/meta-release. If you're upgrading to a LTS release, fetch the meta-release-lts file too and repeat the process.

  • Edit the meta-release file you just downloaded and substitute the external mirror address with the url for the internal mirror so all package locations match up. For me this was replacing archive.ubuntu.com with file:/// and the path of the internal mirror. Make sure the file is readable via http (or file permissions if using file access to repo).

  • Run update-manager or do-release-upgrade and the upgrade should work as you were using an internet mirror.

Solution 2:

When I ran booted with the standard Ubuntu 14.04 DVD and selected the install option, I did get an option to upgrade in-place the existing Ubuntu 12.04 install. I have done such in-place upgrades using the DVD/CD media from 8 to 10 and 10 to 12.04. So I feel it would run without a hitch in the 12.04 to 14.04 case also.