[ previous ] [ Contents ] [ next ]

Release Notes for Debian GNU/Linux 2.1 (Slink) - Chapter 3

Before upgrading your system, it is strongly recommended that you make a full backup, or at least, backup any data or configuration information you can't afford to lose. The upgrade tools and process are quite reliable, but a hardware failure during an upgrade could be catastrophic.

Regardless of the method used for upgrading, it is recommended that you check the status of all packages first. This can be done by dpkg -l | less or dpkg --get-selections > filename, or it can be done in dselect. It is desirable to remove any holds before upgrading. If any package that is essential for the upgrade is on hold, the upgrade will fail. Holds can be removed in dselect, or by editing the file produced by dpkg --get-selections > filename to change "hold" to "install". Then, with root permissions, do dpkg --set-selections < filename.

Any package installation operation must be run with superuser privileges, so either login as root or use su or sudo to gain these privileges.

It is strongly recommended that you use /usr/bin/script to record a transcript of the upgrade session -- in fact, it is a good idea to use script to record any dselect session (and anything else you do that it is desirable to record). Then if any problems develop, you can see what happened. script will write this transcript to the file specified as an argument (script filename) or to the default filename, typescript.

There are two methods of upgrading to slink -- using apt-get directly, or using dselect.

3.1 Using apt-get

If you have not already installed apt, we suggest you download and install it, from ftp://ftp.debian.org/debian/dists/slink/main/binary-alpha/admin/apt_*.deb. Depending on your browser you may need to take special action to download directly to a file, in raw binary mode. For example, in Netscape you need to hold the shift key when clicking on the URL to retrieve the file. Install the downloaded package as root with the command dpkg -i apt*.deb.

If you are installing from CD-ROM, you can install it directly from the CD-ROM. As root, run

     dpkg -i cd_mount_point/debian/dists/slink/main/binary-alpha/admin/apt*.deb

It is recommended that you read the apt-get(8) and the sources.list(5) man pages at this time. Before beginning the upgrade you must set up apt's configuration file, /etc/apt/sources.list. The default configuration is suitable for installation from the Internet, but you may wish to modify /etc/apt/sources.list to use other mirrors or your local mirror. If you are installing from a CD-ROM, see Upgrading from CD-ROMs:, Section 3.2.

Once you have configured apt, run (as root):

     apt-get update
     apt-get -f dist-upgrade

Some people prefer to run apt-get -f --dry-run dist-upgrade | less prior to apt-get -f dist-upgrade in order to see what will happen. While this may be somewhat time consuming, it may avoid some surprises.

If new versions of packages currently installed are available, apt-get dist-upgrade and apt-get upgrade retrieve and upgrade them; under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. Therefore, it may be necessary to use dpkg or dselect to remove and reinstall some broken packages or dependencies. Alternatively, apt-get dselect-upgrade may be used after apt-get -f dist-upgrade. (See the apt-get(8)man page.)

The -f (fix) option causes apt to attempt to correct a system with broken dependencies in place. apt does not allow broken package dependencies to exist on a system. It is possible that a system's dependency structure can be so corrupt as to require manual intervention (which usually means using dselect or dpkg --remove package to eliminate some of the offending packages).

If apt-get reports some broken packages after these two commands, try to repair the system (perhaps removing the broken packages or installing missing dependencies). If you can not repair the system to apt-get's satisfaction, you must use the dselect method (with a non-apt backend) to upgrade.

3.2 Upgrading from CD-ROMs:

The apt code for handling multiple CD-ROMs was not completed in time for the slink release, but there is a workaround available. In /etc/apt/sources.list, add as the first line after the instructional comments:

     deb file:cd_mount_point/debian stable main

The other `deb' lines should be commented out by placing a # before them.

Then insert the first Binary CD, mount it, and, as root, run

          apt-get update 
          apt-get dist-upgrade

As mentioned above, apt-get -f --dry-run dist-upgrade | less may be used before apt-get dist-upgrade to avoid surprises.

While the first CD is still mounted, it would be a good idea to run apt-get install dpkg-multicd

Unmount the first Binary CD, replace it with the second Binary CD, and mount that one. Then change the line in /etc/apt/sources.list to

          deb file:cd_mount_point/debian stable main contrib

and repeat the update and dist-upgrade steps, as shown above.

After upgrading, unmount the last cdrom but leave it in the CDROM drive. Then start dselect. [A]ccess, choose the new multi_cd install method, give the correct /dev-name and Enter on all following questions (the second Binary CDROM should be in the drive when doing this!). [U]pdate. Then [S]elect; press Space to leave the help screen. In the package selection screen, press Shift-D followed by Enter immediately. It is very likely that there will be some dependency conflicts, in which case you will see a help screen. Exit the help screen by pressing space, and inspect the list of packages that is presented. You may change the calculated states, but this is not recommended; just pressing Enter should solve all dependencies/conflicts satisfactorily.

Then [I]nstall. After [I]nstall, another [C]onfigure is usually needed. Then insert the first Binary CD and repeat the process. (This dselect procedure is necessary because xbase is on the second CD, but some of its dependencies are on the first CD.)

The Official Debian CD Set has two Binary CDs. Some vendors produce a set with three Binary CDs, including all or part of non-free and/or non-US. If you have a third Binary CD, unmount the second CD and insert and mount the third one. Change the line in /etc/apt/sources.list to

        deb file:cd_mount_point/debian stable non-free non-US

(Omit non-free or non-US if your CD doesn't include them.)

Then repeat the update and dist-upgrade steps as above. Note that you have to rerun [A]ccess and [U]pdate in dselect after this step, as described above. A few versions of such unofficial third Binary CDs have a structure that makes it possible to have them inserted while performing the [A]ccess and [U]pdate steps; if you have such a CD, packages from all three CDs will be accessible from dselect simultaneously.

An ``unofficial alternative'' using the potato version of apt, version 0.3.x, is available. Keep in mind that the 0.3.x apt is still in beta, so bugs are probably still present. Jason Gunthorpe, one of the principal authors of apt, writes:

            The real solution is to install `apt' 0.3 from potato and use it's
            built-in CD handling through `apt-cdrom'. I have made a special
            source specifically for this, which can be accessed by putting the
            line ``deb http://www.debian.org/~jgg apt/'' in `sources.list', and
            then running `apt-get update; apt-get install apt'.
            This version contains the latest glibc 2.0 linked `apt v 3.x.'
            Install whatever `apt' you can, add the above to your
            `sources.list' (and maybe a temporary ``file:'' uri for the first
            CD-ROM) and then do `apt-get install apt'.
            Next, insert the first disc, run `apt-cdrom add', then insert
            the second disc and run `apt-cdrom add' then run `apt-get
            dist-upgrade -u' twice (or is it 3 times?)

3.3 Using dselect

This section assumes that you have some knowledge of dselect. After all, you did install the system you are trying to upgrade, didn't you? There is a beginner's tutorial for dselect in http://www.debian.org/releases/2.1/alpha/dselect-beginner, in case you need to refresh your memory.

The first step in using dselect is to choose an ``Access'' method. More information about the access methods, and which one you should choose, can be found in the dselect Tutorial referred to above.

The apt access method for dselect is the fastest one presently available. It installs and configures the packages in the proper sequence, so all dependencies are resolved when the packages are unpacked, making a second pass unnecessary. However, the apt access method is not yet able to handle multiple CDs correctly. If any packages on your system are so broken that apt-get upgrade cannot be used, the apt access method will also fail.

The `mounted' access method for dselect installs and configures any pre-depends first, which reduces the number of install passes necessary. The `mountable' access method also attempts to install and configure pre-depends first, and is relatively fast. (There are some known problems with the pre-dependency handling of these access methods; in case of problems, try to use the apt method as described above.)

The recommended access method for use with multiple CDs is the multi_cd method. To use this method, first install dpkg-multicd using:

     dpkg -i cd_mount_point/dists/slink/main/binary-alpha/base/dpkg-multicd


     apt-get install dpkg-multicd

Refer to README.multicd on the first CD and, after installing it, /usr/doc/dpkg-multicd/readme.txt.gz for using this method.

The hamm version of the `http' access method does not handle pre-Depends properly; it is not recommended. If this version of dpkg-http is used to upgrade there will be a prompt Abort automatic installation (Y/n)? for every Pre-Depends. Due to a bug in hamm's dpkg-http the user should hit Ctrl-C instead of Y at this point and manually install (dpkg -i) the requested package. dselect should then be restarted to find the next pre-Dependency. To save time the user may wish to manually install all of the following slink packages: libc6, libncurses4, libreadlineg2, libstdc++2.9, slang1, and libhtml-parser-perl.

Regardless of the access method used, it is recommended that you first upgrade your existing packages before adding any new ones. Run the [A]ccess, [Update], and [S]elect steps of dselect initially. As soon as you enter ``Select'' you should press `D' (shift-D) then Enter immediately. A conflict/depends resolution screen will probably be presented. After resolving the conflicts (usually you can just press Enter), run [I]nstall, and then [C]onfigure to simply upgrade all installed packages. After that you may use the [Select] and [I]nstall modules to install additional packages, if desired.

When dpkg or dselect upgrade many packages, it is usually necessary to repeat the install and configure steps several times before the whole system is configured. Depending on the access method chosen, it may be necessary to repeat the [U]pdate step between install passes. It may be helpful to exit dselect and restart it immediately before the [U]pdate step.

3.4 General Cautions

You should not run the upgrade from any X session managed by xdm on the machine you are upgrading. xdm and xfs are stopped on upgrade, so you would end up with a half-upgraded machine when X suddenly shuts down. If the machine is configured to start X automatically on boot, it may be difficult to fix. If the X server you are using refers to the upgrading host for xfs font services, it will lose its connection to the font server when xfs is stopped. This is not fatal but can be annoying. If in doubt about whether your X session is handled by xdm or not, upgrade your machine from the Linux virtual console.

You should not do the upgrade over a remote telnet connection, unless you install the netstd and telnetd packages from slink first. When the old netstd package is removed, the telnet connection will be broken, and you won't be able to reconnect until the telnetd package is installed.

[ previous ] [ Contents ] [ next ]
Release Notes for Debian GNU/Linux 2.1 (Slink)
version 2.1.11, 28 August, 1999
Bob Hilliard hilliard@debian.org
Adam Di Carlo