This article describes upgrade CentOS 5.5 from i386 arch to x86_64 arch.
First of all, upgrade kernel and boot loader from CD. For my system this operation was done by hosting provider.
After kernel upgrade system have a lot of i386/i686 packages. It isn’t possible to upgrade each package manually. For example, my CentOS had 300+ packages.
To continue you need to install yum
The algorithm of upgrading is simple:
- install for each i386/i686 package its x86_64 analogue
- erase i386/i686 packages
But it can be complicated, because any packages uses the same paths or something else and you need manually to install RPMs.
Let’s begin.
Install yum plugin yum-downloadonly:
yum install yum-allowdowngrade
Then take a list of packages for upgrade:
rpm -qa --qf "%{name}.%{arch}\n" | grep -E "i386|i686"
Copy this list into your text editor and replace “.i386” and “.i686” with “.x86_64”. Also replace all returns with spaces. You will take something like this:
glibc.x86_64 readline.x86_64 ncurses.x86_64
Now download this packages RPMs:
yum install --downloadonly --downloaddir=/root/rpms/ <packages>
where <packages> are in my example glibc.x86_64 readline.x86_64 ncurses.x86_64
Of course directory/root/rpms/ must exist.
When yum finishes to download hundreds of packets, chdir to /root/rpms/ and execute
rpm -i --force *.rpm
rpm will force installation of all downloaded packages.
After installation you need come back to your i386/i686 packages list and uninstall them.
yum erase <packages>
where <packages> are in my example glibc.i686 readline.i386 ncurses.i386
That’s all!