openSUSE:Migrate Leap to Tumbleweed
In the context of this article, 'Upgrade' means moving from openSUSE Leap to Tumbleweed. If you already have Tumbleweed, then see SDB:Upgrade Tumbleweed.
There are 2 supported upgrade mechanisms
- Offline Upgrade - This uses the DVD to boot the system, and upgrade
- Online Upgrade - This changes the repositories on an existing openSUSE Installation and upgrades while the system is online
Offline upgrade is slightly safer as there is no chance of running applications interfering with the Upgrade process
Online upgrade is a little more convenient as it can be done while a system is running, and doesn't require a full DVD download
Offline Upgrade
Offline Upgrade only requires a few steps
- Download the appropriate DVD Media, and burn it to a DVD or USB Stick
- Boot the DVD or USB Stick
- Choose Upgrade
- Follow the Wizard, which will detect which openSUSE installations you have on your machine and offer to upgrade them.
Online Upgrade
! Online upgrade to Tumbleweed >= 20200826 is only supported from Leap >= 15.2 !
There are three tasks needed in order to Online upgrade from any release to Tumbleweed:
- Install the current online updates of the old distribution if any.
- Changing repositories to point to Tumbleweed
- Running zypper dup (which is shorthand for zypper dist-upgrade) to upgrade all packages
Repositories
Start by removing the existing repos:
mkdir /etc/zypp/repos.d/old mv /etc/zypp/repos.d/*.repo /etc/zypp/repos.d/old
Then add the new repos (it depends on your architecture)
- x86, x86_64:
zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/oss repo-oss zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/non-oss repo-non-oss zypper ar -f -c http://download.opensuse.org/tumbleweed/repo/debug repo-debug zypper ar -f -c http://download.opensuse.org/update/tumbleweed/ repo-update
- aarch64:
zypper ar -f -c http://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss repo-oss zypper ar -f -c http://download.opensuse.org/ports/aarch64/tumbleweed/repo/non-oss repo-non-oss zypper ar -f -c http://download.opensuse.org/ports/aarch64/debug/tumbleweed/repo/oss/ repo-debug zypper ar -f -c http://download.opensuse.org/ports/aarch64/update/tumbleweed/ repo-update
Optionally you can also add the repos for the sources, usually you'd use OBS for that purpose.
- x86, x86_64:
zypper ar -f -d -c http://download.opensuse.org/tumbleweed/repo/src-oss repo-src-oss zypper ar -f -d -c http://download.opensuse.org/tumbleweed/repo/src-non-oss repo-src-non-oss
- aarch64:
zypper ar -f -d -c http://download.opensuse.org/ports/aarch64/source/tumbleweed/repo/oss/ repo-src-oss
The resulting list of repositories should look like this:
# zypper lr -u # | Alias | Name | Enabled | Refresh | URI --+-------------------+-------------------+---------+---------+-------------------------------------------------------- 1 | repo-debug | repo-debug | Yes | Yes | http://download.opensuse.org/tumbleweed/repo/debug 2 | repo-non-oss | repo-non-oss | Yes | Yes | http://download.opensuse.org/tumbleweed/repo/non-oss 3 | repo-oss | repo-oss | Yes | Yes | http://download.opensuse.org/tumbleweed/repo/oss 4 | repo-src-non-oss | repo-src-non-oss | No | Yes | http://download.opensuse.org/tumbleweed/repo/src-non-oss 5 | repo-src-oss | repo-src-oss | No | Yes | http://download.opensuse.org/tumbleweed/repo/src-oss 6 | update | repo-update | Yes | Yes | http://download.opensuse.org/update/tumbleweed/
The update repo is usually empty and only used as a last resort, when the next snapshot of tumbleweed is late and a big security hole has to be fixed fast.
Running the upgrade
Once you are done with the repo setup use zypper dup to upgrade.
screen
session to avoid
zypper from getting killed in case e.g. X dies. Alternatively, you can use tmux
or a TTY session.zypper cc -a && zypper ref && zypper dup --allow-vendor-change
Now go make some coffee and have a lot of fun when using our rolling release.
Meanwhile don't forget to subscribe to the mailinglist to stay up to date with the Factory development.
If the upgrade fails: refresh zypper
Sometimes zypper fails to upgrade indicating it cannot find some files like this:
Retrieving: monitoring-tools-1.14.0-4.2.x86_64.rpm ......................................................................................................[error] File './x86_64/monitoring-tools-1.14.0-4.2.x86_64.rpm' not found on medium 'http://download.opensuse.org/repositories/server:/monitoring/openSUSE_Tumbleweed/'
When you look at http://download.opensuse.org/repositories/server:/monitoring/openSUSE_Tumbleweed/x86_64/ you see a more recent version of monitoring-tools-*.x86_64.rpm
The above error usually means your local zypper configuration is out of sync with the repository. A zypper refresh solves that, so this combination correctly updates:
zypper refresh --force zypper dist-upgrade
Common problems
PAM errors after the upgrade
Recently, upgrading to Tumbleweed using the instructions above will result in a faulty PAM configuration, causing errors such as
cron[20917]: PAM unable to dlopen(/usr/lib64/security/pam_cracklib.so): /usr/lib64/security/pam_cracklib.so: cannot open shared object file: No such file or directory cron[20917]: PAM adding faulty module: /usr/lib64/security/pam_cracklib.so
being frequently printed to the system journal.
The issue is with configuration references to PAM modules which no longer exist on Tumbleweed:
# grep -r cracklib /etc/pam.d /etc/pam.d/common-password-pc:password requisite pam_cracklib.so /etc/pam.d/common-password.pam-config-backup:password requisite pam_cracklib.so
Assuming no custom PAM configuration is used on the system, this can be remediated by re-installing the PAM defaults:
# old /etc/pam.d # zypper in -f pam pam-config
This should be done in a root shell to prevent locking oneself out of the system.