Debian upgrade 4 to 5

From Biowikifarm Metawiki
Jump to: navigation, search

Upgrading Debian from version 4(etch) to 5(lenny)

Actual commands executed

 # first, still under old version:
 apt-get update
 aptitude upgrade
 # result:
 # The following packages have been kept back: linux-image-2.6-xenr
 # 0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
 # Need to get 0B of archives. After unpacking 0B will be used.
 # The current version(etch) is in sync.
 cd /etc/apt/
 mv sources.list sources.list.etch
 mv sources.list.lenny sources.list
 # fetch new(lenny) packages: 
 aptitude update
 # fast simulation: aptitude -y -s -f --with-recommends dist-upgrade
 # -> OK
 # Upgrade apt and/or aptitude first:
 # NOT: apt-get install apt, but rather:
 aptitude install apt 
 # -> Accept this solution? [Y/n/q/?] Y
 # Then using NOT aptitude but apt-get, first remove (important!), then install aptitude:
 apt-get remove  aptitude
 apt-get install aptitude
 # Note: First time lenny version of aptitude is run, it will read in 
 #  its list of automatically installed packages and convert it for use 
 #  with the lenny version of apt. Issue at least one aptitude command 
 #  to do conversion. One way is by searching for a non-existent package:
 aptitude search "?false" # see above
 aptitude safe-upgrade # = minimal system upgrade
 aptitude dist-upgrade # = full system upgrade
 #verify update: 
 cat /etc/debian_version

Additional background information

Step from Long howto Notes Status
4.1.1. Back up any data or configuration information We rely on the xen center, here we can make backup of the whole guest. OK
4.1.3. Prepare for recovery We rely on the xen center console (on the host) OK
A.2. Checking your sources list OK
4.2.1. Review actions pending in package manager In the aptitude there was packages scheduled for removal:
Removing dnsutils ...
Removing bind9-host ...
Removing libbind9-0 ...
Removing libisccfg1 ...
Removing libdns22 ...
Removing libisccc0 ...
Removing libisc11 ...
Removing liblwres9 ...
A.1. Upgrading your etch system (update to the latest point release of etch)
# apt-get update
W: GPG error: etch Release: 
The following signatures couldn't be verified because 
the public key is not available

This fix GPG error:

# wget -q -O- | apt-key add -
# apt-get --simulate --show-upgraded upgrade
The following packages have been kept back:
The following packages will be upgraded:
 gzip libaudiofile0 libc6 libc6-dev libexpat1 libkrb53 libltdl3 
 libpq4 libtool libxerces2-java locales
 python2.4 python2.4-minimal
13 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

All these are security updates.

# aptitude upgrade

4.2.3. Checking packages status OK Using packages OK
4.4. Preparing sources for APT OK
4.5.2. Updating the package list OK
4.5.3. Make sure you have sufficient space for the upgrade Simulation:
# aptitude -y -s -f --with-recommends dist-upgrade
4.5.4. Upgrade apt and/or aptitude first
# aptitude install aptitude
# apt-get install aptitude
# aptitude install aptitude
# aptitude search "?false"
4.5.6. Minimal system upgrade
# aptitude safe-upgrade
4.5.7. Upgrading the rest of the system
# aptitude dist-upgrade
4.6. Upgrading your kernel and related packages For Etch, Xensource shipped their own modified PV kernel package (2.6.18 based). With Lenny the same kernel can be used, or the standard Debian xen kernel (2.6.26 based) can be used instead. So we can skip kernel upgrade !