First of all, comment out every line of /etc/apt/sources.list by
placing a hash sign (`#') in front of it (if it isn't already
there).
Then you need to add new "deb" lines describing the location(s)
where apt will get the new packages from. You can add "deb" lines
for a packages mirror on a local harddisk, and/or FTP/HTTP mirrors, and/or
(a set of) CD-ROMs. `Apt' will consider all packages that can be found
via any "deb" line, and use the one with the highest version
number, giving priority to the first mentioned lines. (So, in case of
multiple mirror locations, you'd typically first name a local harddisk,
then CD-ROMs, and finally FTP/HTTP mirrors.)
-
For an archive on a local harddisk, that for example has these directories,
#if OUTPUTtext
/var/ftp/debian/dists/woody/main/binary-ARCH/...
/var/ftp/debian/dists/woody/contrib/binary-ARCH/...
--------------- ----- |\
\________ \_ | \___
add: \ \ | \
--------------- ----- | \
deb file:/var/ftp/debian woody main contrib
#endif
#if OUTPUThtml
/var/ftp/debian/dists/woody/main/binary-ARCH/...
/var/ftp/debian/dists/woody/contrib/binary-ARCH/...
--------------- ----- |\
\________ \_ | \___
add: \ \ | \
--------------- ----- | \
deb file:/var/ftp/debian woody main contrib
#endif
As shown, the `dists' is added implicitly, and the 3rd
and following arguments are used to expand the path into multiple
directories.
If you have a complete mirror that also has non-free and non-US, you
typically have to add lines like these:
deb file:/var/ftp/debian woody main contrib non-free
deb file:/var/ftp/debian-non-US woody/non-US main contrib non-free
If you don't have such a structure, other description lines are
possible, see the sources.list
#if MANPAGEseebelow
manpage (see below).
#else
manpage.
#endif
-
FTP and HTTP packages mirror addresses can be found on
#if CDROMreadme
#if OUTPUTtext
this CD in README.mirrors.txt, or on
#endif
#if OUTPUThtml
this CD in README.mirrors.html, or on
#endif
#endif
#if OUTPUTtext
http://www.debian.org/distrib/ftplist,
#endif
#if OUTPUThtml
http://www.debian.org/distrib/ftplist,
#endif
look at the "Full list of mirrors".
If the mirror has these directories:
#if OUTPUTtext
ftp://some-server/debian/dists/woody/main/binary-ARCH/...
ftp://some-server/debian/dists/woody/contrib/binary-ARCH/...
------------------------ ----- | |
\___ / | |
add: \ / | |
------------------------ ----- | |
deb ftp://some-server/debian woody main contrib
#endif
#if OUTPUThtml
ftp://some-server/debian/dists/woody/main/binary-ARCH/...
ftp://some-server/debian/dists/woody/contrib/binary-ARCH/...
------------------------ ----- | |
\___ / | |
add: \ / | |
------------------------ ----- | |
deb ftp://some-server/debian woody main contrib
#endif
As shown, the `dists' is added implicitly, and the 3rd
and following arguments are used to expand the path into multiple
directories.
If you use a complete mirror that also has non-free and non-US, you
typically have to add lines like these:
deb ftp://some-server/debian woody main contrib non-free
deb ftp://some-server/debian-non-US woody/non-US main contrib non-free
If the mirror doesn't have such a structure, other description lines are
possible, see the sources.list
#if MANPAGEseebelow
manpage (see below).
#else
manpage.
#endif
#if UPGRADING
NOTE: if you're using the static versions of `apt' and `dpkg' from this
directory, the hostname-lookup is "broken" (which is one reason to just
use slink's `apt'). The solution is to simply put the mirrors' IP address
in the "deb" line. (Hint: "nslookup some-server")
#endif
-
If you use (one or more) CD-ROMs, do _not_ add any lines to sources.list
manually.
Instead, first make sure there is a line in /etc/fstab that
connects the /cdrom mount point with your CD-ROM drive (the
exact `/cdrom' mount point is "required" for apt). For example,
if
#if ARCHi386
/dev/hdc
#else
/dev/scd0
#endif
is your CD-ROM drive, /etc/fstab should
contain a line
#if ARCHi386
#if OUTPUTtext
/dev/hdc /cdrom auto defaults,noauto,ro 0 0
#endif
#if OUTPUThtml
/dev/hdc /cdrom auto defaults,noauto,ro 0 0
#endif
#else
#if OUTPUTtext
/dev/scd0 /cdrom auto defaults,noauto,ro 0 0
#endif
#if OUTPUThtml
/dev/scd0 /cdrom auto defaults,noauto,ro 0 0
#endif
#endif
To test this, insert a CD-ROM and give commands
mount /cdrom
ls -alF /cdrom
(should show the CD-ROM's root directory)
umount /cdrom
Then, use the command
apt-cdrom add
to add the data of each CD-ROM to apt's internal database.
This command will ask for one CD-ROM per run, and mount/unmount the
CD-ROM automatically. You should repeat this command for all 3.0 `Binary'
CD-ROMs you have.
#if UPGRADING
(`Source' CD-ROMs can be added as well, but only with the
latest version of `apt' from this directory, and they are not needed for
the upgrade anyway.)
#endif
When the sources.list is correct,
the final step of the preparation is to update apt's internal database
with the command
apt-get update