Upgrade Debian Sarge to Debian Etch

From Nick Jenkins
Jump to: navigation, search

A very helpful resource is the official upgrade manual.

Make a backup of sources.list:

cd /etc/apt
cp sources.list sources.list.sarge

Edit source.list to read like so:

deb http://ftp.au.debian.org/debian/ etch main
deb-src http://ftp.au.debian.org/debian/ etch main
deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib

Check nothing found for this:

dpkg --audit

Save installed packages:

dpkg --get-selections > /etc/apt/sarge-pkgs.txt

Check nothing found:

aptitude search "~ahold" | grep "^.h"
dpkg --get-selections | grep hold

Update from woody to sarge in the sources.list :

nano /etc/apt/sources.list
:%s/sarge/etch/g

Keep a log of the upgrade process:

script -a ~/upgrade-to-etch.typescript

Determine required disk space:

aptitude -y -s -f --with-recommends dist-upgrade

Upgrading those packages which can be upgraded without requiring any other packages to be removed or installed:

aptitude upgrade

Upgrade libc6 and locales and will pull in SELinux support libraries:

aptitude install initrd-tools

See if any of this stuff is installed:

dpkg -l xfree86-common | grep ^ii
dpkg -l libfam0c102 | grep ^ii
dpkg -l xlibmesa-glu | grep ^ii

Yes, so install this:

aptitude install x11-common

Upgrade the kernel:

aptitude install linux-image-2.6-686

Update list of known packages (should say etch, not sarge, in the downloads)

aptitude update

Upgrade aptitude:

aptitude install aptitude

Dist-upgrade with aptitude:

aptitude -f --with-recommends dist-upgrade

... then after the upgrade, purge the old RC files that are no longer needed:

dpkg --purge $(COLUMNS=132 dpkg -l | grep ^rc | awk '{ print $2; }')