apt-walkabout

| quozl@us.netrek.org | up |

An APT with random-access removable media HOWTO
by James Cameron, 2006-08-23

No .deb should ever have to be downloaded more than once!

Synopsis

Describes how to upgrade non-connected or low-speed linked Debian systems using APT with random-access removable media.

Package is a set of shell scripts.

References

"Using APT Offline" by Jason Gunthorpe describes some of the techniques used by apt-walkabout. Install the apt-doc package and then open in your web browser:

Usage Cases

Resources

Using Darcs

Darcs is a distributed revision control system by David Roundy designed to replace centralised CVS. apt-walkabout is provided via darcs to encourage contributions.

install darcs : apt-get install darcs
checkout initial copy : darcs get http://quozl.linux.org.au/darcs/apt-walkabout
(this creates a directory apt-walkabout in your current directory)
propose a change : darcs record
darcs send

(this sends a mail to me with your changes)
update : darcs pull
(this updates your directory with changes made by me and others)

APT Normality

On a normal system APT is used to maintain a list of package sources (/etc/apt/sources.list), a set of downloaded package lists (/var/lib/apt/lists), and a cache of downloaded package archives (/var/cache/apt/archives).

The update phase downloads the package lists from the internet. The dist-upgrade phase downloads the packages and installs them.

apt-walkabout

With apt-walkabout, we operate on removable media instead of using the root filesystem. A status file for each target system is kept, and a package list and archives cache is maintained.

The package lists are downloaded from the internet, the upgrade is simulated to fetch the packages using the per-target status file, and when the media is mounted on the target system the changes can be applied.

A fetch can be run for each remote target system being administered; all the packages required are downloaded to the removable media.

Timing comparison, side by side, old method, vs apt-walkabout:

normal
  • visit the target, (or ssh to it),
  • download packages using target's internet connection,
  • go home.
interim
  • download some packages, or most of them, e.g. my apt cache, cut to a CD or take a laptop,
  • visit them,
  • install packages, download missing, have a drink while stressing over it,
  • go home.
walkabout
  • download all packages required,
  • visit them,
  • install packages, no download required,
  • have a drink without stress,
  • go home.

Types of removable media

Types of random-access removable media

Relevant features of APT

Assumptions

Basic Procedure

Phase 0, Structure

Aim: to build filesystem structure on removable media.

Why: to enable the following procedures to work.

Phase 1, Adoption

Aim: obtain the list of package versions installed.

Why: so that the fetch phase knows what to get.

Phase 2, Update

Aim: to update the package list on the media.

Why: so that the fetch phase knows what to get.

Why: so that the target system can be updated with the new list.

Phase 3, Fetch

Aim: to download the packages required by a target system.

Why: so that the packages can be carried on the media.

Phase 4, Apply

Aim: to update the target system's package list.

Aim: to upgrade the target system packages from the media.

Phase 5, Purge

Aim: to maintain free space on the media.

Why: to prevent a fetch from failing due to lack of space.

Procedure Summary


| quozl@us.netrek.org | up |