Nonsense Not Withstanding

ian mariano : tech music cuisine flight

Dirty Upgrade

If you ever wanted to do an in-place upgrade of a Fedora installation from 32 to 64 bit, there’s scant documentation out there. This procedure isn’t for the faint of heart and is risky. Try at your own risk.

This was done on Fedora 15. Feel free to substitute your favorite mirror for any packages. It goes without saying you should be doing all these procedures as root.

64-bit Kernel

If you just want to run a 64-bit kernel and keep a 32-bit userland, that’s fairly trivial and is the first step in the process.

You will want to make sure you have a proper GPG key as follows.

# rpm --import http://mirrors.yocum.org/fedora/releases/15/Everything/x86_64/os/RPM-GPG-KEY-fedora-x86_64

Next, download the 64-bit kernel and then install it. You should use the current 64-bit kernel version for your installation. In this case, I had 2.6.40-4.i686 installed, so I want to install 2.6.40-4.x86_64.

# wget http://mirrors.yocum.org/fedora/updates/15/x86_64/kernel-2.6.40-4.fc15.x86_64.rpm
# rpm -iv --ignorearch --nodeps --force kernel-2.6.40-4.fc15.x86_64.rpm

This will actually create the entry in /boot/grub/menu.lst. You should confirm it is first in the list and the default loaded.

Reboot and voilá – 64-bit kernel, 32-bit userspace. Try out uname -m.

This will possibly only work up to your next yum upgrade that contains a newer kernel, but the process can be repeated.

To undo this, you can just reboot to a 32-bit kernel and yum remove the 64-bit one.

64-bit Everything

This is essentially force-installing the 64-bit versions of what is already installed.

For this process we’re storing downloaded RPMs at /root/x86_64, but feel free to substitute a location you are comfortable with.

You will need to have the download only plugin for Yum installed.

# yum install yum-downloadonly

The rest of the procedure in 3 steps:

# cd /root/x86_64
# rpm -qa --qf "%{name}.%{arch}\n" | grep -E "i386|i686" | sed 's/i.86/x86_64/ig' | sed ':a;N;$!ba;s/\n/ /g' | xargs yum install -y --setopt=protected_multilib=false --downloadonly --downloaddir=/root/x86_64
# rpm -iv --force *.rpm 

Reboot. And that is that.

Told you it was dirty.

2 Comments

  1. Highly recommended: rpm –verify -a after conversion

  2. Thanks Alberto. It’s also probably wise to:

    rpmconf -a –frontend=vimdiff

Leave a Reply

Required fields are marked *.


*