openSUSE 32 bit to 64 bit update fairy tale

Hell yeah, I joined the fun of the flu pandemic here in Germany. Once you start to recover a bit though, crazy ideas float your mind. For instance the idea of live upgrading or converting an openSUSE 13.2 32 bit installation to 64 bit. It is something I had waiting for me on the table for a long time. So why not? Should be straight forward, or not? Well, almost.

Trouble ahead

Be warned that this is certainly not for the novice Linux user. You’ll need to know at least how to operate with rpm and on the command line as the process is a bit like a surgery. In general though, I was really surprised how well and easy all worked out finally.

Architecture upgrade steps

The process of upgrading/switching the architecture consists of basically three important logical steps:

  1. Install a 64 bit kernel and boot with it
  2. Rip out the heart (glibc, rpm) of the patient and replace it with 64 bit variants
  3. Switch architecture to 64 bit variants for all packages and reboot

This should work for older and newer distribution releases but might differ in the details due to changes in the software tools used. The description here is based on an openSUSE 13.2 system.

It is important to force zypper to use 64 bit packages from the start:

# Force zypper to use 64 bit architecture
$ echo "arch = x86_64" >> /etc/zypp/zypp.conf
# Refresh and rebuild all repositories
$ zypper ref -f

Then install your current kernel as x86_64 and boot into it:

# Tell zypper to reinstall the kernel and replace your old one
$ zypper in -f kernel-desktop
# If you use a different kernel flavor, adjust the name above
$ reboot

Now you must update the system to 64 bit.

Unfortunately it is not as simple as a zypper dup distribution upgrade because underneath, rpm will refuse to install any packages for us. Therefore we must use a small trick:

# Download all needed packages and accept arch change suggestion
$ zypper in --download only --no-recommends -f rpm
# Verify the list of just downloaded packages
$ find /var/cache/zypp/packages/ -iname "*x86_64.rpm"
# Brute force install that mess into the system, it must obey you!
$ rpm -Uhv --force --ignorearch `find /var/cache/zypp/packages/ -iname "*x86_64.rpm"`

If this worked out you are done with the hardest part. Rub your belly, clap your hands or whatever, good job.

The last step is quite easy, you just run a distribution upgrade with zypper and reboot into your shiny 64 bit system:

# Let zypper do the hard work for you, you're just a human!
$ zypper dup --no-recommends --download in-advance
# Grab some hot tea or whatever gets you over the waiting time...
$ reboot
It’s magic!

After rebooting you should …

Welcome the 64 bit world

If you are using NVIDIA blob drivers like I do, you’ll have to download the 64 bit drivers of course and do the regular installation procedure again.

The experience is smooth so far and nothing appears to fail but I’ll report if any defects come up.