Debian always has at least three releases in active maintenance:
stabledistribution contains the latest officially released distribution of Debian. This is the production release.
testingdistribution contains packages that haven’t been accepted into a
stablerelease yet, but they are in the queue for that. The main advantage of using this distribution is that it has more recent versions of software.
unstabledistribution is where active development of Debian occurs. Generally, this distribution is run by developers and those who like to live on the edge.
With new stable Debian release, Debian Wheezy, many new features introduced. To use Debian Wheezy, one can download and install the fresh Debian Wheezy, or upgrade the the previous one to the latest.
In this article, we will discuss about how to upgrade Debian Squeeze (version 6) to Debian Wheezy (version 7). The process will be carried on Virtual Machine, with following situation on:
- Slackware64 14.0 as host
- VirtualBox 4.2.16
- Debian Wheezy amd64
This method is generic therefore, you can also do this to actual production machine. It is also should be applied to x86 machine (32 bit).
For upgrade, you should have internet connection. This will be needed to download the update, though we can also use local repository but this is not recommended.
For the rest of article, I assume you use root privileges to execute command.
Always do a backup!
It is important to make a backup of your system before you do this. The official Debian document recommends:
The main things you’ll want to back up are the contents of /etc, /var/lib/dpkg, /var/lib/apt/extended_states and the output of dpkg –get-selections “*” (the quotes are important). If you use aptitude to manage packages on your system, you will also want to back up /var/lib/aptitude/pkgstates.
The upgrade process itself does not modify anything in the /home directory. However, some applications (e.g. parts of the Mozilla suite, and the GNOME and KDE desktop environments) are known to overwrite existing user settings with new defaults when a new version of the application is first started by a user. As a precaution, you may want to make a backup of the hidden files and directories (“dotfiles”) in users’ home directories. This backup may help to restore or recreate the old settings. You may also want to inform users about this.
To upgrade our system to next version we need to make sure our current system is ready and complete.
You can remove unnecessary packages. Some packages you might not use now but not affecting the operating system, something like third party software such as editor, player, etc. Skip this is should be OK too.
Next we should fully upgrade our current system.
With the current repository, do:
apt-get update apt-get upgrade apt-get dist-upgrade
Next, make a data backup.
Although there should not be a problem to perform update via SSH, if possible it is recommended to perform upgrade directly using console. Of course this is not applicable in case of VPS.
First we need to edit our repository and point it to Jessie repository.
Edit /etc/apt/sources.list. You can do it using any editor. Find words wheezy and replace it with jessie. It is also recommended that you use nearest mirror repository (for example: http://kambing.ui.ac.id for Indonesia).
If you have done editing it, update it by using:
This will update the index and package list and point them to jessie.
Next, upgrade the packages. We need this before upgrade our debian.
And then we upgrade the distribution itself.
After the upgrade, reboot the system.
Verify your system by invoking following command:
It should give you something like this:
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.0 (jessie) Release: 8.0 Codename: jessie
Check for erros on log files:
tail -f /var/log/messages egrep -i --color 'err|warn|crit' /var/log/fileName
At this point, our Debian has been upgrade to Jessie. 😀