Upgrading Debian Squeeze to Wheezy

These are just my notes on what I had to do, while upgrading my VPS from Debian Squeeze (6.0.7) to Debian Wheezy (7.1)

Just to verify what version I’m running:

# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 6.0.7 (squeeze)
Release:	6.0.7
Codename:	squeeze

First edit the /etc/apt/sources.list to include ONLY

deb http://ftp.de.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.de.debian.org/debian/ squeeze main contrib non-free

deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

# squeeze-updates, previously known as 'volatile'
deb http://ftp.de.debian.org/debian/ squeeze-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ squeeze-updates main contrib non-free

Next we walk apt through an update/upgrade phase to make sure everything is current before we do the actual upgrade

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

Now we have to make sure no packages are being held from being upgraded:

dpkg --audit
dpkg --get-selections | grep hold

Then we run ‘aptitude’ and press ‘g’ hoping to get the message:

No packages are scheduled to be installed, removed or upgraded

Which means we are ready to proceed with the upgrade!

Now edit /etc/apt/sources.list to ONLY include:

deb http://ftp.de.debian.org/debian wheezy main contrib non-free
deb-src http://ftp.de.debian.org/debian wheezy main contrib non-free
deb http://ftp.de.debian.org/debian wheezy-updates main contrib non-free
deb http://ftp.de.debian.org/debian-security wheezy/updates main contrib non-free

Now we are ready to pull the trigger!

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

Provided that went well, we can now reboot into the new system!

# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.1 (wheezy)
Release: 7.1
Codename: wheezy

Caveats!

First thing I had an issue with, was re-running apt-get update/apt-get upgrade I got the following errors:

The following packages have been kept back:

db4.8-util ia32-libs

So let’s fix the ia32-libs issue first.  For those who don’t know, ia32-libs lets x86_64 systems run old i386 32bit binaries.  Trying a simple ‘fix’ of installing the libraries got me this:

# apt-get install ia32-libs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ia32-libs : Depends: ia32-libs-i386 but it is not installable
E: Unable to correct problems, you have held broken packages.
#

Luckily the fix is rather simple, we need to add the i386 architecture, like this:

# dpkg --add-architecture i386

Then re-run an apt-get udate/apt-get upgrade, followed by the installation of the ia32 libraries:

#apt-get install ia32-libs

And that settled that out.

The db4.8-util thing was somewhat easier:

 

# apt-get install   db4.8-util
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32tinfo5
  lib32v4l-0 lib32z1 libc6-i386 libio-stringy-perl libjpeg62
  libmono-corlib2.0-cil libmono-i18n-west2.0-cil libmono-posix2.0-cil
  libmono-security2.0-cil libmono-system2.0-cil libmysqlclient16 libsox1b
  libt1-5 mono-2.0-gac
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libdb4.8
The following packages will be upgraded:
  db4.8-util
1 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 829 kB of archives.
After this operation, 121 kB disk space will be freed.
Do you want to continue [Y/n]? y

Which seemed to be fixing things, but it was an out of date mono installation on my part. So I had to re-add the location where I got my mono:

deb http://debian.meebey.net/pkg-mono ./

Then remove it

apt-get update
apt-get upgrade
apt-get remove mono-2.0

Then remove the mono line from the /etc/apt/sources.list

apt-get update
apt-get upgrade
apt-get install mono-2.0

Another error message I saw in my apache error log was this:

Error: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/suhosin.so' -
/usr/lib/php5/20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown, line 0

Which can be traced to a no longer supported extension suhosin. So I just purged it from the system:

aptitude purge php5-suhosin

Another problem that has cropped up is the following when adding or removing packages:

dpkg: warning: files list file for package ‘libc6:i386’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘libtinfo5:i386’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘liblzma5:i386’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘libavahi-common-data:i386’ missing; assuming package has no files currently installed

I’m not sure why this suddenly happened.  However the fix is simple enough, we just have to regenerate the lists, something like this for libc:

dpkg-deb -c /var/cache/apt/archives/libc6_2.13-37_i386.deb | awk {‘print $6’} | cut -f2- -d. | sed ‘s|^/$|/.|’ | sed ‘s|/$||’ > /var/lib/dpkg/info/libc6:i386.list

And that seems to be it so far.

4 thoughts on “Upgrading Debian Squeeze to Wheezy

Leave a Reply