Upgrading Debian Squeeze to Wheezy
Wheezy has reached stable and for those of you who don't want to reinstall your system the upgrade procedure is quite straight forward. As always there is a risk of borking your system so make sure you have a backup before you start. First step is to make sure you have no special packages installed. Packages from the standard Debian repositories should be safe as well as most of the backports but I strongly recommend to remove packages from third party sources before starting. You also have to be logged in as root to perform the update. Running under sudo is shaky! I have also noticed that upgrading using apt is recommended over aptitude for Wheezy. Step 1 - Make sure the system is up to date This is done using the regular apt upgrade procedures. # apt-get update # apt-get upgrade # apt-get dist-upgrade Step 2 - Update apt sources and change squeeze to wheezy Edit your /etc/apt/sources.list and change all 'squeeze' to 'wheezy'. Also remove or comment out the squeeze volatile source if there is one. It is not needed for the upgrade. A valid sources.list may look like this. deb http://ftp.se.debian.org/debian/ wheezy main non-free contrib deb-src http://ftp.se.debian.org/debian/ wheezy main non-free contrib deb http://security.debian.org/ wheezy/updates main non-free contrib deb-src http://security.debian.org/ wheezy/updates main non-free contrib Also don't forget to take a look at the files in /etc/apt/sources.list.d/ (if there is any) and perform the same replace procedure. Step 3 - Disable X Since a lot of packages will be updated and daemons will be restarted there is a potential risk of screwing something up when running under X. Go to a regular TTY console and continue the upgrade from there. Alt+F1 or Alt+Ctrl+F1 should get you to the first console. Log in as root and continue to the next step. Step 4 - Perform the actual upgrade When you are logged in to the TTY console. The upgrade process may be initiated. First we must update the latest sources. # apt-get clean # apt-get update The next two steps is the actual upgrade that will alter the system. First we perform a normal upgrade. A lot of packages will be replaced and also quite a lot will be kept back. This is normal. # apt-get upgrade Usually this step will ask the user to alter fstab to use UUID's for the drives instead of sda1 etc. Let the installer make this change! You can alter this later if you want to but to be sure to get back into a bootable state do this for now. Also there may be questions about configuration files that is edited by the user and set to be replaced by the upgrade. If unsure, sticking to the default value is often a safe choice. If the screen goes back to X press Alt+F1 (or Alt+Ctrl+F1) to get back to the install console. When the first upgrade step is complete we can go on to the next one. # apt-get dist-upgrade This step will also upgrade those packages earlier reported as kept back. Step 5 - Reboot into the new system # reboot This is it. I have performed this upgrade on several systems now with good results as long as no third party packages or user modifications screws something up. As always, to get the cleanest possible system the only way is to start from scratch and do a clean install from the new installation media.

Write a comment

Name

E-mail (not visible)

Comment


Code from above