http://teddyb.org/~rlpowell/hobbies/debian_arch_up/
I have done quite a few migrations of debian systems from 32bit to 64 bit without a reinstall. I have made quite a few modifications in the procedure and streamlined it a bit. Below is the base procedure I follow to upgrade.
Beware: this isn't a fool proof procedure! You need to know what you're doing. If you don't, you can easily destroy you system.
To begin, check you have a 64bit kernel installed, which has 32bit binary capability. When doing a
it should return x86_64.
Make sure the following packages are installed.
Also, make sure you have a complete install against your currently defined repository. If you are not sure, run the following commands (these can be quite interesting, even without upgrading to 64bit :) ):
Before starting, we need a script to easily retrieve packages from a debian repository. Using this script saves a lot of time manually downloading packages.
getdeb Change the parameters in the script to suite your needs. Now, when the base system is up-to-date, we start with creating some directories. This is done in root's homedir, make sure you have a bit of space there, or choose another directory.
Change the parameters in the script to suite your needs.
Now, when the base system is up-to-date, we start with creating some directories. This is done in root's homedir, make sure you have a bit of space there, or choose another directory.
Now we're going to download some 32bit packages from the 64bit repository.
And some 64bit packages:
Just to be clear, these package work at the moment for me, in the unstable repository. I could very well be you need different packages.
We're now going to install the 64bit package version of libc6 32bit:
And the rest of the 32bit compatablilty packages:
Then we're going to install the base of the 64bit packages:
Now we need to check the following commands still work:
If those still work, make sure the current architecture is amd64:
Now we're going to upgrade all packages to 64bit. First, fix some problems with the perl packages:
This should give a couple of errors, ignore those. Then we update the packages. This can take quite some time.
I usually get a conflict here on the kdb package (you could get other conflicts depending on your install base). The error looks like this:
I usually resolve it like this:
Which will also produce an error :). Just keep going by issueing a:
Now we need to build a list of still installed 32bit packages.
All these packages need to be reinstalled. This can take quite a while.
To be sure there aren't any pending packages, issue:
Now we need to verify which installed packages are still 32bit. Build a list with the following commands:
Check the 32bit packages
It can be that you have some 32bit packages installed. For example, some old packages that have been phased out and don't have any 64bit install candidates, or kernel packages. If you want to make sure, do the following (example is for the gcc-4.2-base package):
In this case, no package is available.
If all packages are ok, remove the 32bit packages by:
Verify your installation one more time, this should not result in any installs.
Just to be sure, it might be usefull to regenerate your kernel's initrd image. It is best to remove the existing and regenerate it. The example below is for a 2.5.32.22-openvz64 kernel:
If you are paranoid there are still important executables out there that need to be upgraded, you can always look for them:
Basically your system should now be converted to 64bit and be able to boot. Give it a try :)