robertmuench.de

To the point & Out of the box


Upgrade Debian Etch to Lenny running inside a VMWare virtual machine

For all my Linux developments I use Debian. Since Debian released version 5 (known as Lenny) I bite the bullet and tried to completely upgrade my Debian 4 (known as Etch) system to it. As I have it running inside a VMWare virtual machine, I needed to install the latest tools as well.

So, the first step was to upgrade Etch to Lenny. That’s pretty simple to do:

1. Ensure that your /etc/apt/sources.list file looks like this:

deb http://ftp2.de.debian.org/debian/ etch main
deb-src http://ftp2.de.debian.org/debian/ etch main

deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib


Explicitly mentioning
etch is necessary because now Lenny is the new stable version. And we first want to get our Etch installation up-to-date.

2. Then update Etch to the most actual state.

aptitude update
aptitude upgrade

3. Now we need to switch to the Lenny files in /etc/apt/sources.list

deb http://ftp2.de.debian.org/debian/ lenny main
deb-src http://ftp2.de.debian.org/debian/ lenny main

deb http://security.debian.org/ lenny/updates main contrib
deb-src http://security.debian.org/ lenny/updates main contrib


4. Update the package database to include all the new Lenny stuff.

aptitude update


5. Install the Lenny versions of dpkg, aptitude, and apt to ensure the upgrade will succeed.

aptitude install dpkg aptitude apt


6. Now upgrade all already installed packes.

aptitude upgrade


7. Than do a full upgrade of your installation.

aptitude full-upgrade


8. When this finished, reboot the system:

reboot

9. Login and check your new kernel:

uname -r


This should display Lenny's 2.6.26 kernel information. Something like this:

2.6.26-2-686


And /etc/debian_version should now contain 5.0:

cat /etc/debian_version
5.0



Ok, now we have a running Lenny version. Next is to update the VMWare tools from the command line. There is a problem with the actual „normal“ VMWare tools because the code base uses a function
get_info that is no longer available in the 2.26 Linux kernel. Luckily a simple fix exists: Use the VMWare tools from the „VMware Server 2“ distribution. This is a free download as well from VMWare’s web-site.

From the download extract
vmware-server-distrib/lib/isoimages/linux.iso and mount it as your cd-rom. So, first configure your running VMWare that it uses the ISO file as base for the cd-rom and than use:

mount /dev/cdrom /mnt/cdrom


This will mount the content into the running Lenny instance.

Extract the vmware-tools-.tgz to some temporary directory. In my case the file was VMwareTools-7.7.5-156745.tar.gz

Before we can build the tools, cross-check that all tools and headers are installed.

aptitude install build-essential autoconf automake linux-headers-`uname -r`


Now run
./vmware-install.pl from your temporary directory.

Most likely you will get the following error message:

Your kernel was build with “gcc” version “4.1.3″, while you are trying to use “/usr/bin/gcc” version “4.3.2″


In this case you just need to „switch“ to the correct GCC version (which is already installed)

export CC=/usr/bin/gcc-4.1


Run the ./vmware-install.pl script once again and now everything should work. You can answer all the questions with the provided default values. At the end just reboot your machine and your done.
0 Comments