Updating Debian offline

Q We have a number of computers running Debian that do not have full internet access. Some are not networked at all. What is the best way to keep these up to date? Currently we copy updated Deb files to a CD and install them manually on each computer, but there must be a better way. We thought about a local Debian mirror, but that would consume a lot of bandwidth to keep up to date and still wouldn't help with the non-networked systems.

A The answer lies in a useful package called APTonCD. This creates a repository on a CD (or DVD) that you can use to install or update non- networked PCs. APTonCD is also a useful backup and replication tool because you can use it to create CDs or a DVD containing all the packages currently installed on a computer, then use those discs to reinstall that computer or install the same set on packages on another machine. If you use Ubuntu Feisty you can install APTonCD via Synaptic, but it is not in the standard Debian Etch repositories, so get it from http://aptoncd.sourceforge.net and install on each of your computers with

dselect --install aptoncd_0.1~rc-0ubuntu1_all.deb

The easiest way to use this is to have one internet-connected computer that you keep up to date and use this to build CDs or a DVD to update the others. First run the program on your internet-connected computer and click on Create APTonCD. It'll scan your system for all packages in /var/cache/apt/archives, which is all the packages you've installed unless you've cleaned out this directory. You're then presented with the full list of packages, all selected. Remove any you don't want from the list (you may wish to do this to ensure it all fits on a single disc) and add extra packages.

APTonCD will add the dependencies of any package you add, unless you tell it to not do this. APTonCD can burn to CDs or DVDs and will create as many discs as are needed to hold the files. Press OK and APTonCD will create one or more ISO images ready to burn to disc with your favourite CD/DVD burning app. The program will offer to burn the disc as soon as it has finished writing the ISO image(s). Once you have written the images to a CD or DVD, put it in one of your non-networked computers, run APTonCD and select the Restore tab. The first two options deal with restoring a system from the CD, which may be of interest at some time but isn't what you are looking for in your question. The third Restore option adds the disc as a repository, which can then be used by apt-get, Synaptic or other package management tool to update the computer.

If you look in /etc/apt/sources.list, or select Settings > Repositories in Synaptic, you will see that your new CD has been added to the available software sources. Run the Update Manager and you can see and apply any updates to this system. It is a good idea to clean out your sources.list the next time you create and add a disc from APTonCD, otherwise you'll end up with several CD entries in here, one for each time you update.

Follow us on Identi.ca or Twitter

Username:   Password: