Doing do-release-upgrade on an offline ubuntu mirror

| 2 Comments | No TrackBacks
I have an offline mirror of the ubuntu package repositories for use on a network not connected to the internet. This works like a charm for updating packages on individual machines, but when it comes to doing a 'do-release-upgrade' to the next release, like these days I'm trying to upgrade to 9.10 Karmic Koala, we need some tricks to make this work. Firstly, sync your mirror so all the new packages of the new release are locally available. What you probably find is that the upgrade manager/do-release-upgrade software can't seem to find a new available automagically. So how do we accomplish this?

  1. 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'.
  2. 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.
  3. 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 'explorer/mirror' since the internal mirror is available at http://explorer/mirror/ubuntu/. Make sure the file is readable via http (or file permissions if using file access to repo).
  4. Run update-manager or do-release-upgrade and the upgrade should work as you were using an internet mirror.

No TrackBacks

TrackBack URL: http://blog.knuthaugen.no/mt/mt-tb.cgi/17

2 Comments

Many thanks for this post; I find myself wanting to do the same to avoid gratuitous burden on the main repositories. One thing is holding me back, though; while I've added

deb-i386 http://archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
deb-i386 http://archive.ubuntu.com/ubuntu lucid-proposed main restricted universe multiverse

that doesn't suffice to pull in

...ubuntu/dists/karmic-proposed/main/dist-upgrader-all/0.126.9

and the files therein that /etc/update-manager/meta-release refers to. What do I need to tell apt-mirror in order to retrieve those files?

I may have spoken too soon... first I should check whether apt-mirror has actually finished its run.

mini bio

Knut Haugen [Knu:t Hæugen], Norwegian software developer with a penchant for dynamic languages and anything to with developer testing. Agile methodology geek with bias on Lean and Kanban. Some pointers to other stuff by me

meta

This page contains a single entry by Knut Haugen published on December 3, 2009 1:42 PM.

Hacking on munin 1.4 was the previous entry in this blog.

A MacOS X Keyboard Layout for Programming is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.