Wednesday, May 21, 2008

Upgrading Fedora i386 to x86_64

Fedora Core 9 installation script warns that upgrading FC i386 to FC9 x86_64 is likely to fail, which is indeed what happens if you chose to proceed. However, the resulting mess can be fixed relatively easily.

First, the grub configuration must be fixed. Just boot from the installation DVD, do "chroot /mnt/sysimage", edit grub.conf file to include the correct kernel and other filenames (note that for some reason it was moved from /etc/grub.conf to /boot/grub/grub.conf) and rerun grub-install. After that you should be able to boot.

The next step is to fix yum/rpm configuration. Edit "/etc/rpm/platform" and change the platform to "x86_64-redhat-linux". After that yum should work OK, except that for some reason the DVD repository may not be configured correctly. Check that " /etc/yum.repos.d/Fedora-install-media.repo" (or any other InstallMedia configuration file) has the following:

name=Fedora 9
enabled = 1

Now you should have more or less working system with lots of packages from previous installation which were not upgraded correctly. I wrote a small script which looks for all Fedora Core 8 packages and upgrades them to FC9 x86_64. Remember to disable all repositories except for InstallMedia before running the script:

for i in `rpm -qa | grep fc8 `; do
echo $i
j=`rpm -q $i --qf %{NAME}`
echo $j
rpm -e --nodeps $i
yum -y install $j

You may also want to upgrade all "i386" packages in the same way, in which case just replace "fc8" with "i386" in the above script.

Labels: , , , , , ,


Anonymous Anonymous said...

Thanx for the information, I was wondering why I can install only i386 packages.

3:14 AM  
Blogger Demiurg said...

Check "/etc/rpm/platform" file (details are actually in the post itself, i.e. above).

BTW, I eventually switched back to i386 - x86_64 applications eat insane amounts of RAM.

11:33 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home