Difference between revisions of "Debian upgrade 4 to 5"

From Biowikifarm Metawiki
Jump to: navigation, search
m
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Upgrading Debian from version 4 to 5  
+
Upgrading Debian from version 4(etch) to 5(lenny)
  
Simple howto: http://www.cyberciti.biz/tips/howto-upgrade-debian-linux-4etch-to-5lenny-server.html
+
* Simple howto: http://www.cyberciti.biz/tips/howto-upgrade-debian-linux-4etch-to-5lenny-server.html
 +
* Long howto: http://www.debian.org/releases/lenny/i386/release-notes/ch-upgrading.en.html
 +
* Xensource guest Etch to Lenny: http://www.steveglendinning.com/2009/02/15/upgrading-xensource-debian-etch-guests-to-lenny/
  
Long howto: http://www.debian.org/releases/lenny/i386/release-notes/ch-upgrading.en.html
+
== Actual commands executed ==
 +
 
 +
<source lang="bash">
 +
# first, still under old version:
 +
apt-get update
 +
aptitude upgrade
 +
# result:
 +
# The following packages have been kept back: linux-image-2.6-xenr
 +
# 0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
 +
# Need to get 0B of archives. After unpacking 0B will be used.
 +
# The current version(etch) is in sync.
 +
cd /etc/apt/
 +
mv sources.list sources.list.etch
 +
mv sources.list.lenny sources.list
 +
# fetch new(lenny) packages:
 +
aptitude update
 +
# fast simulation: aptitude -y -s -f --with-recommends dist-upgrade
 +
# -> OK
 +
# Upgrade apt and/or aptitude first:
 +
# NOT: apt-get install apt, but rather:
 +
aptitude install apt
 +
# -> Accept this solution? [Y/n/q/?] Y
 +
# Then using NOT aptitude but apt-get, first remove (important!), then install aptitude:
 +
apt-get remove  aptitude
 +
apt-get install aptitude
 +
# Note: First time lenny version of aptitude is run, it will read in
 +
#  its list of automatically installed packages and convert it for use
 +
#  with the lenny version of apt. Issue at least one aptitude command
 +
#  to do conversion. One way is by searching for a non-existent package:
 +
aptitude search "?false" # see above
 +
aptitude safe-upgrade # = minimal system upgrade
 +
aptitude dist-upgrade # = full system upgrade
 +
#verify update:
 +
cat /etc/debian_version
 +
</source>
 +
 
 +
== Additional background information ==
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 12: Line 50:
 
|-
 
|-
 
|4.1.1. Back up any data or configuration information
 
|4.1.1. Back up any data or configuration information
| We relay on the xen center, here we can make backup of the whole guest.
+
| We rely on the xen center, here we can make backup of the whole guest.
 
| OK
 
| OK
 
|-
 
|-
 
| 4.1.3. Prepare for recovery
 
| 4.1.3. Prepare for recovery
| We relay on the xen center console (on the host)
+
| We rely on the xen center console (on the host)
 
| OK
 
| OK
 
|-
 
|-
Line 37: Line 75:
 
| A.1. Upgrading your etch system (update to the latest point release of etch)
 
| A.1. Upgrading your etch system (update to the latest point release of etch)
 
|  
 
|  
  $ apt-get update
+
  # apt-get update
 
  ...
 
  ...
 
  W: GPG error: http://updates.xensource.com etch Release:  
 
  W: GPG error: http://updates.xensource.com etch Release:  
Line 44: Line 82:
  
 
This fix GPG error:
 
This fix GPG error:
  $ wget -q -O- http://updates.xensource.com/XenServer/5.0.0/GPG-KEY | apt-key add -
+
  # wget -q -O- http://updates.xensource.com/XenServer/5.0.0/GPG-KEY | apt-key add -
  
  $ apt-get --simulate --show-upgraded upgrade
+
  # apt-get --simulate --show-upgraded upgrade
 
  The following packages have been kept back:
 
  The following packages have been kept back:
 
   linux-image-2.6-xen
 
   linux-image-2.6-xen
Line 55: Line 93:
 
  13 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
 
  13 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
  
| wait for real upgrade
+
All these are security updates.
 +
 
 +
# aptitude upgrade
 +
...DONE
 +
 +
 
 +
| DONE
 
|-
 
|-
 
| 4.2.3. Checking packages status
 
| 4.2.3. Checking packages status
Line 64: Line 108:
 
|  
 
|  
 
| OK
 
| OK
 +
|-
 +
| 4.4. Preparing sources for APT
 +
|
 +
| OK
 +
|-
 +
| 4.5.2. Updating the package list
 +
|
 +
| OK
 +
|-
 +
| 4.5.3. Make sure you have sufficient space for the upgrade
 +
| Simulation:
 +
# aptitude -y -s -f --with-recommends dist-upgrade
 +
| OK
 +
|-
 +
| 4.5.4. Upgrade apt and/or aptitude first
 +
|
 +
# aptitude install aptitude
 +
# apt-get install aptitude
 +
# aptitude install aptitude
 +
# aptitude search "?false"
 +
|
 +
|-
 +
| 4.5.6. Minimal system upgrade
 +
|
 +
# aptitude safe-upgrade
 +
|
 +
|-
 +
| 4.5.7. Upgrading the rest of the system
 +
|
 +
# aptitude dist-upgrade
 +
|
 +
|-
 +
| 4.6. Upgrading your kernel and related packages
 +
| For Etch, Xensource shipped their own modified PV kernel package (2.6.18 based).  With Lenny the same kernel can be used, or the standard Debian xen kernel (2.6.26 based) can be used instead. '''So we can skip kernel upgrade !'''
 +
|
 
|}
 
|}

Latest revision as of 14:27, 30 January 2013

Upgrading Debian from version 4(etch) to 5(lenny)

Actual commands executed

 # first, still under old version:
 apt-get update
 aptitude upgrade
 # result:
 # The following packages have been kept back: linux-image-2.6-xenr
 # 0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
 # Need to get 0B of archives. After unpacking 0B will be used.
 # The current version(etch) is in sync.
 cd /etc/apt/
 mv sources.list sources.list.etch
 mv sources.list.lenny sources.list
 # fetch new(lenny) packages: 
 aptitude update
 # fast simulation: aptitude -y -s -f --with-recommends dist-upgrade
 # -> OK
 # Upgrade apt and/or aptitude first:
 # NOT: apt-get install apt, but rather:
 aptitude install apt 
 # -> Accept this solution? [Y/n/q/?] Y
 # Then using NOT aptitude but apt-get, first remove (important!), then install aptitude:
 apt-get remove  aptitude
 apt-get install aptitude
 # Note: First time lenny version of aptitude is run, it will read in 
 #  its list of automatically installed packages and convert it for use 
 #  with the lenny version of apt. Issue at least one aptitude command 
 #  to do conversion. One way is by searching for a non-existent package:
 aptitude search "?false" # see above
 aptitude safe-upgrade # = minimal system upgrade
 aptitude dist-upgrade # = full system upgrade
 #verify update: 
 cat /etc/debian_version

Additional background information

Step from Long howto Notes Status
4.1.1. Back up any data or configuration information We rely on the xen center, here we can make backup of the whole guest. OK
4.1.3. Prepare for recovery We rely on the xen center console (on the host) OK
A.2. Checking your sources list OK
4.2.1. Review actions pending in package manager In the aptitude there was packages scheduled for removal:
Removing dnsutils ...
Removing bind9-host ...
Removing libbind9-0 ...
Removing libisccfg1 ...
Removing libdns22 ...
Removing libisccc0 ...
Removing libisc11 ...
Removing liblwres9 ...
OK
A.1. Upgrading your etch system (update to the latest point release of etch)
# apt-get update
...
W: GPG error: http://updates.xensource.com etch Release: 
The following signatures couldn't be verified because 
the public key is not available

This fix GPG error:

# wget -q -O- http://updates.xensource.com/XenServer/5.0.0/GPG-KEY | apt-key add -
# apt-get --simulate --show-upgraded upgrade
The following packages have been kept back:
 linux-image-2.6-xen
The following packages will be upgraded:
 gzip libaudiofile0 libc6 libc6-dev libexpat1 libkrb53 libltdl3 
 libpq4 libtool libxerces2-java locales
 python2.4 python2.4-minimal
13 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

All these are security updates.

# aptitude upgrade
...DONE

DONE
4.2.3. Checking packages status OK
4.2.5.1. Using backports.org packages OK
4.4. Preparing sources for APT OK
4.5.2. Updating the package list OK
4.5.3. Make sure you have sufficient space for the upgrade Simulation:
# aptitude -y -s -f --with-recommends dist-upgrade
OK
4.5.4. Upgrade apt and/or aptitude first
# aptitude install aptitude
# apt-get install aptitude
# aptitude install aptitude
# aptitude search "?false"
4.5.6. Minimal system upgrade
# aptitude safe-upgrade
4.5.7. Upgrading the rest of the system
# aptitude dist-upgrade
4.6. Upgrading your kernel and related packages For Etch, Xensource shipped their own modified PV kernel package (2.6.18 based). With Lenny the same kernel can be used, or the standard Debian xen kernel (2.6.26 based) can be used instead. So we can skip kernel upgrade !