Recently Debian Linux version 7.0 (“Wheezy”) released. This version shipped with many new features – improvements to multimedia support, improved security through hardening flags and the OpenStack suite and the Xen Cloud Platform to name a few. How do I upgrades from Debian Linux version 6.x.x (squeeze) to the latest version 7.0.0 wheezy using command line options? How do I upgrade my Debian 6.x server to 7.x over the ssh session?
First things first
Make a backup – it cannot be stressed enough how important it is to make a backup of your system before you do this. Most of the actions listed in this post are written with the assumption that they will be executed by the root user running the bash or any other modern shell. The official Debian document recommends (see the references section below for more info):
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.
The following instructions are tested on 64 bit version only but should work with 32 bit system. Edit the file called /etc/apt/sources.list, enter:
# vi /etc/apt/sources.list
Find word squeeze and replace with wheezy. At the end it should look as follows:
deb http://mirrors.kernel.org/debian/ wheezy main deb-src http://mirrors.kernel.org/debian/ wheezy main deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main # wheezy-updates, previously known as 'volatile' deb http://mirrors.kernel.org/debian/ wheezy-updates main deb-src http://mirrors.kernel.org/debian/ wheezy-updates main
To update the package list, enter:
# apt-get update
To update the minimal base system, enter:
# apt-get upgrade
To upgrade the rest of the system, enter:
# apt-get dist-upgrade
Reboot the system:
Verify your system, type:
$ lsb_release -a
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.0 (wheezy) Release: 7.0 Codename: wheezy
Check the kernel version, enter:
$ uname -mrs
Linux 3.2.0-4-amd64 x86_64
Also, check log files for error:
# tail -f /var/log/messages
# egrep -i --color 'err|warn|crit' /var/log/fileName
- I strongly suggest that you read the “Chapter 4. Upgrades from Debian 6.0 (squeeze)” for up to date information.