≡ Menu

upgrading debian remotely

Debian Upgrade: GNU/Linux 4.0 Update 5 Available

The industry strength community driven enterprise grade Debian GNU/Linux version 4.0 stable update 5 has been released and available for immediate downloaded as well as updates via apt-get package manager. This update mainly adds corrections for security problems to the stable release, along with a few adjustment to serious problems. All users are advised to upgrade system.

Those who frequently install updates from security.debian.org won't have to update many packages and most updates from security.debian.org are included in this update.

New CD and DVD images containing updated packages and the regular installation media accompanied with the package archive respectively will be available soon at the regular locations.

Miscellaneous Bugfixes

This stable update adds several binary updates for various architectures to packages whose version was not synchronised across all architectures. It also adds a few important corrections to the following packages:

    Package			Reason
    apache2			Fix several vulnerabilities
    apache2-mpm-itk		Rebuild against apache2 and fix hanging processes on restart/shutdown
    blosxom			Fix XSS
    dist			Fix insecure temp file usage
    fai-kernels			Fix xfs corruption / Xen crash
    feta			Fix insecure temp file usage
    git-core			Support download of packs v2 through dumb transports
    goby			Rebuild against net6
    irqbalance			Fix segfault when /proc/interrupts contains an interrupt with a number of 256 or larger
    jumpnbump			Fix insecure handling of /tmp
    libpam-pwdfile		Use gcc instead of ld
    linux-2.6			Fix xfs corruption / Xen crash
    myspell			Fix insecure temp file usage
    net6			Fix object access after deallocation
    obby			Rebuild against new net6
    postgresql-8.1		Upstream bugfix release 8.1.13
    sobby			Rebuild against new net6
    trac			Fix multiple vulnerabilities
    tzdata			Updates to several timezones and daylight saving times settings
    user-mode-linux		Fix xfs corruption / Xen crash
    wdiff			Fix race condition related to temporary files

Debian Linux Security Updates

This revision adds the following security updates to the stable release. The Security Team has already released an advisory for each of these updates:

    Advisory ID		Package			Correction(s)
    DSA 1597		mt-daapd		Fix several vulnerabilities (fixes for regression)
    DSA 1614		iceweasel		Fix several vulnerabilities
    DSA 1615		xulrunner		Fix several vulnerabilities
    DSA 1616		clamav			Fix denial of service
    DSA 1617		refpolicy		Fix incompatible policy
    DSA 1618		ruby1.9			Fix several vulnerabilities
    DSA 1619		python-dns		Fix DNS response spoofing
    DSA 1620		python2.5		Fix several vulnerabilities
    DSA 1621		icedove			Fix several vulnerabilities
    DSA 1622		newsx			Fix arbitrary code execution
    DSA 1623		dnsmasq			Fix cache poisoning
    DSA 1624		libxslt			Fix arbitrary code execution
    DSA 1625		cupsys			Fix arbitrary code execution
    DSA 1626		httrack			Fix arbitrary code execution
    DSA 1627		opensc			Fix smart card vulnerability
    DSA 1628		pdns			Fix DNS response spoofing
    DSA 1629		postfix			Fix programming error
    DSA 1630		linux-2.6		Fix several vulnerabilities
    DSA 1630		fai-kernels		Fix several vulnerabilities
    DSA 1630		user-mode-linux		Fix several vulnerabilities
    DSA 1631		libxml2			Fix denial of service
    DSA 1632		tiff			Fix arbitrary code execution
    DSA 1633		slash			Fix multiple vulnerabilities
    DSA 1634		wordnet			Fix arbitrary code execution
    DSA 1636		linux-2.6.24		Fix denial of service / information leak
    DSA 1638		openssh			Fix denial of service
    DSA 1639		twiki			Fix arbitrary code execution
    DSA 1640		python-django		Fix several vulnerabilities
    DSA 1641		phpmyadmin		Fix several vulnerabilities
    DSA 1642		horde3			Fix cross site scripting
    DSA 1643		feta			Fix insecure temp file usage
    DSA 1644		mplayer			Fix integer overflows
    DSA 1645		lighttpd		Fix various problems
    DSA 1646		squid			Fix array bounds check
    DSA 1647		php5			Fix several vulnerabilities
    DSA 1648		mon			Fix insecure temporary files
    DSA 1649		iceweasel		Fix several vulnerabilities
    DSA 1650		openldap2.3		Fix denial of service
    DSA 1651		ruby1.8			Fix several vulnerabilities
    DSA 1652		ruby1.9			Fix several vulnerabilities
    DSA 1653		linux-2.6		Fix several vulnerabilities
    DSA 1653		fai-kernels		Fix several vulnerabilities
    DSA 1653		user-mode-linux		Fix several vulnerabilities
    DSA 1654		libxml2			Fix execution of arbitrary code
    DSA 1655		linux-2.6.24		Fix several vulnerabilities

How do I upgrade my Debian system?

Login as root and type the following command:
# apt-get update
# apt-get upgrade

Sample output:

Get:1 http://http.us.debian.org stable Release.gpg [386B]
Get:2 http://security.debian.org stable/updates Release.gpg [189B]
Hit http://http.us.debian.org stable Release
Hit http://security.debian.org stable/updates Release
Ign http://http.us.debian.org stable/main Packages/DiffIndex
Ign http://security.debian.org stable/updates/main Packages/DiffIndex
Ign http://http.us.debian.org stable/non-free Packages/DiffIndex
Ign http://http.us.debian.org stable/contrib Packages/DiffIndex
Ign http://security.debian.org stable/updates/contrib Packages/DiffIndex
Ign http://security.debian.org stable/updates/non-free Packages/DiffI
Setting up apache2-mpm-worker (2.2.3-4+etch6) ...
Starting web server (apache2)....
Setting up apache2 (2.2.3-4+etch6) ...

Reboot the system:
# uname -mrs
# reboot

Make sure everything is working fine:
# uname -a
# netstat -tulpn
# tail -f /var/log/messages
# dmesg | less
# tail -f /var/log/path/to/app.file
# iptables -L -n

Further readings:

Howto upgrade Debian 3.1 Sarge to Debian 4.0 Etch stable

Debian 4.0 has been released. It is recommended that you upgrade the system to latest version. Upgrading remote Debian server is a piece of cake :D

Currently many of our boxes are powered by Debian 3.1 Sarge. For example typical web server may have following packages only:
=> Apache
=> PHP
=> Postfix and other mail server software
=> Iptables and backup scripts
=> MySQL 5.x etc


Following are essential steps to upgrade your system:
1. Verify current system
2. Update package list
3. Update distribution
4. Update /etc/apt/sources.list file
5. Reboot system
6. Test everything is working

Backup your system

Before upgrading your Debian systems make sure you have backup (I’m assuming that you make backup copies of all important data/files everyday:):

  1. User data / files / Emails (/home, /var/www etc)
  2. Important system files and configuration file stored in /etc
  3. MySQL and other database backup
  4. Backup Installed package list [Get list of installed software for reinstallation / restore software]

Step # 1: Verify current system

File /etc/debian_version stores current Debian version number :
$ cat /etc/debian_version


Find out kernel version
$ uname -mrs

Linux 2.6.8-3-386 i686

Step #2: Update package list

Use apt-get command:
# apt-get update

Step #3 : Update distribution

Pass dist-upgrade option to apt-get command. This will upgrade Sarge to Etch. dist-upgrade' in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary.
# apt-get dist-upgrade

This upgrade procedure takes time. Depend upon installed softwares and other factors such as network-speed you may need to wait from 10 minutes to 1+ hour(s).

Step #4 : Update /etc/apt/sources.list file

There seems to be a small bug in upgrade procedure. You need to manually update Debian security source line. You will see an error as follows:
W: Conflicting distribution: http://security.debian.org stable/updates Release (expected stable but got sarge)
W: You may want to run apt-get update to correct these problems

Just open /etc/apt/sources.list file:
# vi /etc/apt/sources.list
Find line that read as follows:
deb http://security.debian.org/ stable/updates main contrib
Replace with :
deb http://security.debian.org/ etch/updates main contrib non-free

Save and close the file. Now type the following command:
# apt-get update

Step #5: Reboot system

You are done. Just reboot the system:
# reboot

Step #6: Make sure everything is working...

See Debian distro version:
$ cat /etc/debian_version


Make sure all services are running, just go thought all log files once.
# netstat -tulpn
# tail -f /var/log/log-file-name
# less /var/log/dmesg
# top

Use apt-key command to manage the list of keys used by apt to authenticate packages. Packages which have been authenticated using these keys will be considered trusted. Make sure you see package etch related keys:
# apt-key list

pub   1024D/2D230C5F 2006-01-03 [expired: 2007-02-07]
uid                  Debian Archive Automatic Signing Key (2006) <ftpmaster@debian.org>
pub   1024D/6070D3A1 2006-11-20 [expires: 2009-07-01]
uid                  Debian Archive Automatic Signing Key (4.0/etch) <ftpmaster@debian.org>
pub   1024D/ADB11277 2006-09-17
uid                  Etch Stable Release Key <debian-release@lists.debian.org>

If there is a problem use following command to update the local keyring with the keyring of Debian archive keys and removes from the keyring the archive keys which are no longer valid.
# apt-key update
# apt-key list

Finally just see if any new updates/security updates are available:
# apt-get update
# apt-get upgrade

Further readings