Contact:
Thorsten Gunkel
63456 Hanau
Germany
Mail
Vote to help me to improve this page!
Did this page satisfy your expectations?
vote3 Yes
vote2 Partly
vote1 No
Short comment?
Do not change this:
Add your comment to the
guestbook.
Last modified: 20-02-2009 22.36
NO ePATENTS

Howto fill a ftp server with the Debian installation CDs

This pages explains how to fill a ftp server with the packages that can be found on the Debian installation CDs (so can install Packages from the server instead of using the CDs).
06-08-2005 13.09

Solution With WOODY and apt-ftparchive

Tested with WOODY, SARGE, ETCH, LENNY
  • Install/configure a ftp server that provides e.g. /var/ftp/pub/debian/deb-cds
  • Install apt-ftparchive
  • Create somewhere a file called apt-ftparchive.conf and put the following lines in it:
    (example works for etch, i386 amd64 and powerpc)
    Dir
    {
    ArchiveDir "/var/ftp/pub/debian/deb-cds/";
    CacheDir "tmp/";
    };
    Default
    {
    Packages::Compress ". gzip";
    DeLinkLimit 0;
    FileMode 0644;
    }
    TreeDefault
    {
    Packages "$(DIST)/$(SECTION)/binary-$(ARCH)/Packages";
    Directory "pool/$(SECTION)";
    Contents "$(DIST)/Contents-$(ARCH)"
    };
    tree "dists/lenny"
    {
    Sections "main contrib non-free";
    Architectures "i386 amd64 powerpc";
    }
  • Create directories (in this case lenny (stable) and i386, amd64 and powerpc):
    cd /var/ftp/pub/debian/deb-cds
    mkdir tmp
    #i386
    mkdir -p dists/lenny/main/binary-i386
    mkdir -p dists/lenny/contrib/binary-i386
    mkdir -p dists/lenny/non-free/binary-i386
    #amd64
    mkdir -p dists/lenny/main/binary-amd64
    mkdir -p dists/lenny/contrib/binary-amd64
    mkdir -p dists/lenny/non-free/binary-amd64
    #powerpc
    mkdir -p dists/lenny/main/binary-powerpc
    mkdir -p dists/lenny/contrib/binary-powerpc
    mkdir -p dists/lenny/non-free/binary-powerpc
    #
    cd dists
    ln -s lenny stable
    cd ..
  • For each cd do: cp -r /cdrom/pool /var/ftp/pub/debian/deb-cds/
  • cd /var/ftp/pub/debian/deb-cds/
    apt-ftparchive generate apt-ftparchive.conf
  • chown -R ftp.proxy /var/ftp/pub/debian/deb-cds
  • find /var/ftp/pub/debian/deb-cds -name TRANS.TBL -exec rm -v '{}' ';'
  • client /etc/apt/sources.list:
    deb ftp://your_server/pub/debian/deb-cds/ stable main contrib non-free

Installations

I only use this ftp server for already installed systems, if you use it for fresh installations you'll may face some problems. Just mail me if this is the case.
  • Release File

    The Woody installation insists on Release file, the Etch even requires a signed Release file.
    cd /var/ftp/pub/debian/deb-cds/dists/lenny/
    echo "Origin: Debian
    Label: Debian
    Suite: stable
    Version: 5.0
    Codename: lenny
    Architectures: amd64 i386 powerpc
    Components: main contrib
    Description: Debian 4.0r0 Released copied from DVD and CD to ftp" > Release
    apt-ftparchive release . >> Release
    See also Debian Syntax Release File.
    In order to be able to sign the Release file you need a gpg key (I'll assume 12345678 is your key id, see gpg --list-keys for the real value):
    gpg --gen-key
    gpg --detach-sign --armor --output Release.gpg --local-user 12345678 --sign Release
    Either send this key to a keyserver or offer if for manual download somewhere.
    gpg --send-keys 12345678
    gpg --armor --export 12345678 > mykey.txt
    Each client has to accept it once:
    cat mykey.txt | apt-key add -
  • root, rescue and drivers

    The ftp doesn't contain the root, rescue and drivers floppies. Any need for this?
20-02-2009 22.36

Solution for POTATO With apt-move

  • Install/configure a ftp server that provides /var/ftp/pub/debian/deb-cds
  • Install apt-move
  • /etc/apt-move.conf
    ARCH=i386
    LOCALDIR=/var/ftp/pub/debian/deb-cds
    DEBSTABLE=
    DEBUNSTABLE=
    DEBFROZEN=
    DIST=stable
    PKGTYPE=binary
    SECTIONS="main contrib non-free non-US/main non-US/contrib non-US/non-free"
    USSITE=ftp.de.debian.org
    NONUSSITE=non-us.debian.org
    FILECACHE=/var/cache/apt/archives
    LISTSTATE=/var/state/apt/lists
    DELETE=no
    MAXDELETE=20
    LOGFILE=/var/log/apt-move.log
    MONITOR=/dev/null
  • Create directories:
    mkdir /var/ftp/pub/debian/deb-cds
    mkdir /var/ftp/pub/debian/deb-cds/dists/
    mkdir /var/ftp/pub/debian/deb-cds/dists/potato/
    ln -s potato /var/ftp/pub/debian/deb-cds/dists/stable
  • Is /var/cache/apt/archives really empty?
  • While you're online: apt-move get
  • For each CD:
    • find /cdrom/ -name *.deb -exec cp -v '{}' /var/cache/apt/archives ';'
    • apt-move move
  • apt-move packages
  • chown -R ftp.proxy /var/ftp/pub/debian/deb-cds
  • client /etc/apt/sources.list deb ftp://your_server/pub/debian/deb-cds/ potato contrib main non-US/contrib non-US/main
06-08-2005 13.09
Powered by PHP Created with Xemacs Valid XHTML 1.0! Valid CSS!