Saturday, 25 June 2005

How to make your own package CD for offline use

If you can't use the DVD images for some reason or want to help a friend with low internet bandwidth, here's a quick'n'dirty way to make your own transportable package CD:
  1. Download all needed packages.
  2. Put them all in one directory.
  3. Open a terminal window, cd to the directory.
  4. Enter the following command :
    $ dpkg-scanpackages . /dev/null | gzip > Packages.gz
  5. Burn the directory on CD.
You can later add the CD as a package source with the command:
$ sudo apt-cdrom add
The 'add' option is used to add a new disc to the source list. It will unmount the CDROM device, prompt for a disk to be inserted and then proceed to scan it and copy the index files. If the disk does not have a proper disk directory structure, you will be prompted for a descriptive title. APT uses a CDROM ID to track which disc is currently in the drive and maintains a database of these IDs in /var/lib/apt/cdroms.list .
Note: This tip is specific to Ubuntu Linux but can be used for other debian based distros too.

No comments:

Post a Comment