Sunday, August 7, 2011

Upgrading to the next Debian Version

Squeeze: "I am the chosen one!"
Goodbye Squeeze and Hello Wheezy


Upgrading Debian is pretty straight forward. There are several version identified by their code name such as Buzz, Rex, ... Woody, ... Squeeze,... to Sid. They are all named after Toy-Story characters. If you prefer to always stay at the working version you can refer to them by their working names such as stable, testing and unstable.


At the current moment Squeeze is stable and Wheezy is in testing. With testing you loose some stability, but you can always rollback a package to the last version that was working. Sid, (the kid who breaks all the toys) is always unstable regardless of the current version of Debian. Sid is unstable and receives no security updates. Usually upgrades are one way, unless you are a Debian expert, as the scripts are designed to go one way.

  • squeeze (stable)
  • wheezy (testing)
  • sid (unstable)

The testing version becomes stable once the Debian team is ready to release the next version. At this point it becomes stable and receives no more upgrades. Wheezy would become stable and Sid, unstable would be called testing and given a cute new Toy-Story character name. Unstable would be renamed to Sid.


Upgrading is relatively painless. But remember once you upgrade, you have to stay at that version. So testing cannot become stable and unstable cannot become testing. However, if you refer to the distribution by its name such as Wheezy rather than testing, it will eventually become stable and thus frozen. The only exception is security updates, which are critical updates that must be passed down to the stable distribution


/etc/apt/sources.list
# Security 
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'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib non-free


# Regular Updates
deb http://ftp.ca.debian.org/debian squeeze main contrib non-free
deb-src http://ftp.ca.debian.org/debian squeeze main contrib non-free


I simply ran in vim:
:%s/squeeze/wheezy/g



/etc/apt/sources.list
# Security 
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free


# squeeze-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free
# deb-src http://ftp.debian.org/debian/ wheezy-updates main contrib non-free


# Regular Updates
deb http://ftp.ca.debian.org/debian wheezy main contrib non-free
deb-src http://ftp.ca.debian.org/debian wheezy main contrib non-free



This replaced all occurrences of squeeze with wheezy. In addition, I commented out the squeeze-updates (as they only apply to the stable distribution).
If I wanted to stay as a rolling testing distribution I could have typed
:%s/squeeze/testing/g


Then to upgrade your system upgraded type:
sudo aptitude update
sudo aptitude full-upgrade


full-upgrade is similar to the old command sudo dpkg --dstro-upgrade.  You may also try safe-upgrade which will keep packages that are to be removed and still require dependencies. I found this did not work well with aptitude and I had to use the full-upgrade.


You will have to manage any conflicts, however, I found the upgrade process fairly pain-free as aptitude provides suggestions.


He looks sad, but thats Wheezy!
As you can see my original version before upgrading:
>uname -s
Linux extensa4630z 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 i686 GNU/Linux


After Upgrading:
>uname -s
Linux extensa4630z 2.6.39-2-686-pae #1 SMP Tue Jul 5 03:48:49 UTC 2011 i686 GNU/Linux

No comments:

Post a Comment