Whole document tree
    

Whole document tree

The Debian GNU/Linux FAQ - Keeping Your Debian System Up To Date
[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ] [ next ]

The Debian GNU/Linux FAQ
Chapter 8 - Keeping Your Debian System Up To Date


One of Debian goals is to provide a consistent upgrade path and a secure upgrade process, and we always do our best to make the new release smoothly upgradable from the previous ones. In case there's some important note to add to the upgrade process, the packages will alert the user, and often provide a solution to a possible problem.

You should also read the Release Notes, document that describes the details of specific upgrades, shipped on all Debian CDs, and available on the WWW at http://www.debian.org/releases/stable/i386/release-notes/.


8.1 How can I upgrade my Debian 1.3.1 (or earlier) distribution, based on libc5, to 2.0 (or later), based on libc6?

There are several ways to upgrade:

  • Following closely the Debian libc5 to libc6 Mini-HOWTO and upgrade the most important packages by hand. autoup.sh is based on this Mini-HOWTO, so this method should work more or less like using autoup.sh.
  • Using a libc5-based apt. APT stands for A Package Tool, and it might replace dselect some day. Currently, it works just as a command-line interface, or as a dselect access method. You will find a libc5 version in the dists/slink/main/upgrade-older-i386 directory at the Debian archives.
  • Using just dselect, without upgrading any package by hand first. It is highly recommended that you do NOT use this method if you can avoid it, because dselect alone currently does not install packages in the optimal order. APT works much better and it is safer.

8.2 How can I keep my Debian system current?

One could simply execute an anonymous ftp call to a Debian archive, then peruse the directories until he finds the desired file, and then fetch it, and finally install it using dpkg. Note that dpkg will install upgrade files in place, even on a running system. Sometimes, a revised package will require the installation of a newly revised version of another package, in which case the installation will fail until/unless the other package is installed.

Many people find this approach much too time-consuming, since Debian evolves so quickly -- typically, a dozen or more new packages are uploaded every week. This number is larger just before a new major release. To deal with this avalanche, many people prefer to use an automated programs. Several different packages are available for this purpose:


8.2.1 APT

APT is an advanced interface to the Debian packaging system. apt-get is the command-line tool for handling packages, and APT dselect method is an interface to APT through dselect. Both of these provide a simpler, safer way to install and upgrade packages.

APT features complete installation ordering, multiple source capability and several other unique features, see the User's Guide in /usr/share/doc/apt/guide.html/index.html.

Install the apt package, and edit the /etc/apt/sources.list file to set it up. If you wish to upgrade to the latest stable version of Debian, you'll probably want to use a source like this one:

     http://http.us.debian.org/debian stable main contrib non-free

You can replace http.us.debian.org with the name of a faster Debian mirror near you. See the mirror list at http://www.debian.org/misc/README.mirrors for more information.

Details on this can be found in apt-get(8) and sources.list(8) manual pages, as well as in the aforementioned APT User's Guide, in /usr/share/doc/apt/guide.html/index.html.

Then run

     apt-get update

followed by

     apt-get dist-upgrade

Answer any questions that might come up, and your system will be upgraded.

To use APT with dselect, choose the APT access method in dselect's method selection screen (option 0) and then specify the sources that should be use. The configuration file is /etc/apt/sources.list, and its format is described in the sources.list(5) manual page.

If you want to use CDs to install packages, you can use apt-cdrom. For details, please see the Release Notes, section "Setting up for an upgrade from a local mirror".

Please note that when you get and install the packages, you'll still have them kept in your /var directory hierarchy. To keep your partition from overflowing, remember to delete extra files using apt-get clean and apt-get autoclean, or to move them someplace else (hint: use apt-move).


8.2.2 dpkg-ftp

This is an older access method for dselect. It can be invoked from within dselect, thereby allowing a user the ability to download files and install them directly in one step. To do this, select the ftp access method in dselect (option 0) and specify the remote hostname and directory. dpkg-ftp will then automatically download the files that are selected (either in this session of dselect or earlier ones).

Note that, unlike the mirror program, dpkg-ftp does not grab everything at a mirror site. Rather, it downloads only those files which you have selected (when first starting up dpkg-ftp), and which need to be updated.

dpkg-ftp is somewhat obsolete. You should use the APT access method with ftp:// URLs in sources.list instead.


8.2.3 mirror

This Perl script, and its (optional) manager program called mirror-master, can be used to fetch user-specified parts of a directory tree from a specified host via anonymous FTP.

mirror is particularly useful for downloading large volumes of software. After the first time files have been downloaded from a site, a file called .mirrorinfo is stored on the local host. Changes to the remote filesystem are tracked automatically by mirror, which compares this file to a similar file on the remote system and downloads only changed files.

The mirror program is generally useful for updating local copies of remote directory trees. The files fetched need not be Debian files. (Since mirror is a Perl script, it can also run on non-Unix systems.) Though the mirror program provides mechanisms for excluding files names of which match user-specified strings, this program is most useful when the objective is to download whole directory trees, rather than selected packages.


8.2.4 dpkg-mountable

dpkg-mountable adds an access method called `mountable' to dselect's list, which allows you to install of any filesystem specified in /etc/fstab (e.g. a normal hard disk partition, or an NFS server), which it will automatically mount and umount for you if necessary.

It also has some extra features not found in the standard dselect methods, such as provision for a local file tree (either parallel to the main distribution or totally separate), and only getting packages which are required, rather than the time-consuming recursive directory scan, as well as logging of all dpkg actions in the install method.


8.3 Must I go into single user mode in order to upgrade a package?

No. Packages can be upgraded in place, even in running systems. Debian has a start-stop-daemon program that is invoked to stop, then restart running process if necessary during a package upgrade.


8.4 Do I have to keep all those .deb archive files on my disk?

No. If you have downloaded the files to your disk (which is not absolutely necessary, see above for the description of dpkg-ftp), then after you have installed the packages, you can remove them from your system.


8.5 How can I keep a log of the packages I added to the system?

dpkg keeps a record of the packages that have been unpacked, configured, removed, and/or purged, but does not (currently) keep a log of terminal activity that occured while a package was being so manipulated.

The simplest way to work around this is to run your dpkg/dselect/apt-get/whatever sessions within the script(1) program.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ] [ next ]

The Debian GNU/Linux FAQ

version 3.0, 30 April 2002
Authors, Section 15.1