A live upgrade from the prior version is officially supported. This allows to perform a complete operating system upgrade in place, without reloading everything from scratch.
- 1 Summary
- 2 Supported scenarios
- 3 Making sure you are up to date
- 4 Running the Upgrade
- 5 Links to other openSUSE or SUSE projects
This page explains how to run a tool or a series of command line steps to upgrade your system to the latest version of openSUSE.
Doing a live upgrade has advantages as well as disadvantages.
Among the advantages are:
- You only download the packages that need to be upgraded, thus using a lot less bandwidth.
- During the upgrade, you can still use your workstation (even if this is not recommended); the only downtime will be the reboot after the upgrade.
- You do not have to use a DVD, nor do you need a DVD writer. (You also could boot from the net or a USB key, and install the rest from the net...)
- If, for any reason, the upgrade is interrupted (e.g. power outages, network disconnect) and the process cannot continue, you could be left with a broken system (that depends on where the process stopped of course).
- If you have multiple systems to upgrade, you use bandwidth each time, so it might be better to download an ISO image.
- It does not do all of the cleanup and maintenance that an offline DVD Upgrade does.
Warning: Do not skip a release when upgrading! Example: do not upgrade from 42.3 to 15.1. Instead, from 42.3 upgrade to 15.0, then from 15.0 upgrade to 15.1.
Other possibility: Offline upgrade, a.k.a. traditional or DVD upgrade. For more information, read offline upgrade. This upgrade method is safer and more versatile. Unless you have a good reason to do otherwise, use the offline upgrade method.
Update from 32-bit openSUSE to Leap is not supported. Leap is 64-bit only. If your hardware has x86_64 support, you can upgrade 13.2 to 64-bit first. See 32-bit to 64-bit upgrade.
On the AArch64 architecture (64-bit ARM), upgrading from Leap 15.0 to Leap 15.1 is not supported. Please do a fresh installation on those systems.
Be aware that, in principle, this upgrade process is considered “best effort” only. This means that due to some third-party packages and the myriad of possible configurations, it is possible for some combinations to cause failure upon upgrade.
Also, remember these important rules:
- All important data must be backed up prior to beginning the upgrade process.
- You must update your system with the latest updates for the release you are currently running before running zypper dup.
- You must only zypper dup to the next release. Hopping over a release, e.g., going from 42.1 -> 15.1, is not supported.
Note: according to factory mail list it has been tested in openQA direct upgrade from openSUSE 12.x to Tumbleweed (till snapshot 1101). Currently (Nov 2017) the process is tested from 13.x and 42.x directly to TW. However, this does not mean that you should do it! You could hit an unknown problem.
Making sure you are up to date
The supported starting point is the last openSUSE release with all current updates applied. This does not include arbitrary openSUSE Build Service repositories you may have added. We recommend that you disable all OBS repositories first, perform the upgrade, then reenable them. The following steps show you how to update your openSUSE distribution to the current packages before upgrading to the next version.
1. Check if the update repository already exists and is enabled and update before upgrading.
zypper repos --uri
Check if http://download.opensuse.org/update/leap/15.0/oss/ (for openSUSE Leap 15 or later, replace 15.0 with your version) exists in one of the URI column values, and Yes in column Enabled, like the example below,
# | Alias | Name | Enabled | Refresh | URI ---+-----------------+-----------------+---------+---------+---------------------------------------------------- 1 | repo-update | repo-update | Yes | Yes | http://download.opensuse.org/update/leap/15.0/oss/
If the Enabled column says No, enable it by issuing the command
zypper modifyrepo --enable repo-update
- where ‘repo-update’ is the name of the update repository.
If it exists and has been enabled, continue to step 3.
2. Add update-repository
(If your pre-upgrade system is 15.0 and the update repository doesn't already exist):
zypper addrepo --check --refresh --name 'openSUSE-Leap-15.0-Update' http://download.opensuse.org/update/leap/15.0/oss/ repo-update
- Replace 15.0 above with your current openSUSE version.
3. Move /var/cache to a separate subvolume
/var/cache contains a lot of very volatile data, such as the Zypper cache with RPM packages in different versions for each update. As a result of storing data that is mostly redundant but highly volatile, the amount of disk space a snapshot occupies can increase very fast. For solving this problem move /var/cache to a separate subvolume:
- Find out the device name of the root file system:
- Identify the parent subvolume of all the other subvolumes. For openSUSE 15.1 installations, this is a subvolume named with @:
btrfs subvolume list / | grep '@'
- If the output of this command is empty, you do not have a subvolume named with @. In that case, you may be able to proceed with subvolume ID 5 which was used in older versions of openSUSE.
- Mount the specific subvolume to a temporary mount point:
mount /dev/<root-device> -o subvol=@ /mnt
- If you don't have a @ in the subvolume name, mount subvolume ID 5 instead:
mount /dev/<root-device> -o subvolid=5 /mnt
- /mnt/var/cache can already exist and could be the same directory as /var/cache. To avoid data loss, move it:
mv /mnt/var/cache /mnt/var/cache.old
- Create a new subvolume:
btrfs subvol create /mnt/var/cache
- If there is now a directory /var/cache.old, move it to the new location:
mv /var/cache.old/* /mnt/var/cache
- If that is not the case, instead do:
mv /var/cache/* /mnt/var/cache/
- After moving (optionally) remove /mnt/var/cache.old:
rm -rf /mnt/var/cache.old
- Unmount the subvolume from the temporary mount point:
- Add an entry to /etc/fstab for the new /var/cache subvolume. Use an existing subvolume as a template to copy from. Make sure to leave the UUID untouched (this is the root file system's UUID) and change the subvolume name and its mount point consistently to /var/cache.
- Mount the new subvolume as specified in /etc/fstab:
4. Update system to the latest packages
For more information, read Zypper Usage.
See YaST Online Update.
Running the Upgrade
The following steps will show you how to upgrade your openSUSE distribution to the following release (eg. 15.0 -> 15.1). As already mentioned, any third party or OBS repositories can cause troubles, so it is recommended to disable or remove them before proceeding.
Before you begin
Make sure that you read the list of annoying bugs for the new version you are going to install. Some of them could affect the update process. Usually, alongside the bug is listed some solution or workaround, so make sure that you are prepared for upcoming problems.
Also, read the Release Notes which list changes and glitches in the new release.
As an example, the following steps show how to upgrade from Leap 15.0 to 15.1
If an alias is required, any unique id can be used:
- Take a look at all repos you have and remove all third party/OBS repos you no longer need
zypper lrIf a version of the repo exists for the new version, you can disable the repo instead of removing and after upgrading re-enable. The next system update after re-enabling should upgrade packages from the repo automatically
# zypper rr <alias>
# zypper mr --disable <alias>
- The following command creates a backup copy of all existing repos:The following command modifies all repos from the old to the new. Modify "15.0" if your current system is not 15.0:
# cp -Rv /etc/zypp/repos.d /etc/zypp/repos.d.Old
# sed -i 's/15.0/15.1/g' /etc/zypp/repos.d/*
- Refresh new repositories If you haven't removed third party/OBS repositories you may encounter some errors as these repositories may not exist yet or they may have different unguessable URL. It is always recommended to remove them and add their newer version after upgrade.
# zypper --gpg-auto-import-keys ref
- Now execute the full distribution upgrade.
# zypper dup
# zypper dup --download-in-advance
zypper dupstep now to receive the final release.
- Search for updated openSUSE Leap 15.1 compatible third-party repositories that you used before — if you still need them — and add them. Warning: Use with caution. Using third-party repositories may break your system or cause instabilities.Or, if you have URL of a .repo file:
zypper addrepo --name <name> <url> <alias>
# zypper ar <url.repo>
- After upgrade, reboot is recommended to start the new kernel and newer versions of everything.
zypper upcan be run from time to time to ensure you have the latest available packages from the various repositories that you have enabled. YOU (Yast Online Update) only addresses security updates from the official repositories.