Upgrade/Supported
From openSUSE
| This guide shows how to use zypper to do a live distribution upgrade of openSUSE. Doing a live-upgrade has many advantages but at the same time a major disadvantage.
Among the advantages are:
The disadvantage:
|
| Version: 11.2
| Starting with openSUSE 11.2, a live upgrade from the prior version of openSUSE 11.1 is officially supported. This allows one to perform a complete operating system update in place, without reloading everything from scratch. For versions prior to 11.2 see Upgrade/Unsupported. |
|
Contents |
User experience
Run a tool or a series of command line steps to upgrade to a new distribution.
Supported scenarios
Be aware that in principle, this update 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.
It is very important that all important data is backed up prior to beginning the upgrade process.
The following scenarios are the two options available:
- Command line - using zypper.
- Graphical tool - using YaST.
Starting point
The supported starting point is openSUSE 11.1 with all current updates applied. The following steps show you how to update your openSUSE 11.1 to the current packages before upgrading to openSUSE 11.2.
Command Line
1. Check if 11.1 update repository already exists and is enabled.
zypper repos --uri
- Check if
http://download.opensuse.org/update/11.1/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/11.1/
- If column Enabled says No, enable it by issuing this command,
zypper modifyrepo --enable repo-update
- If it exists and has been enabled, continue to step 3.
2. Add 11.1 update-repository.
zypper addrepo --check --name 'openSUSE-11.1-Update' http://download.opensuse.org/update/11.1/ repo-update
3. Update system to the latest packages.
zypper refresh zypper update
For more information, read Zypper Usage.
Graphical Tool
See the following page YaST Online Update.
Implementation
The following steps will show you how to upgrade your openSUSE 11.1 to openSUSE 11.2.
Command line
1. List your repositories and note which are not openSUSE 11.2 compatible. See accompanying Discussion link above.
zypper ls -d
2. Adapt your repositories to support openSUSE 11.2 (old packages might not be compatible).
- Rename your existing (openSUSE 11.1) repositories to minimize name conflict.
- In example, if you have OSS, non-OSS, and update repositories for openSUSE-11.1 you can rename it to,
zypper renamerepo repo-oss 111-repo-oss zypper renamerepo repo-update 111-repo-update zypper renamerepo repo-non-oss 111-repo-non-oss
- Disable all existing pre-openSUSE 11.2 repositories,
zypper modifyrepo --all --disable
- Add the new openSUSE 11.2 repositories,
zypper addrepo --name "openSUSE-11.2 OSS" http://download.opensuse.org/distribution/11.2/repo/oss/ repo-oss zypper addrepo --name "openSUSE-11.2 Non-OSS" http://download.opensuse.org/distribution/11.2/repo/non-oss/ repo-non-oss zypper addrepo --name "openSUSE-11.2 Updates" http://download.opensuse.org/update/11.2/ repo-update
- The last argument sets an alias (a shorthand), you can choose another alias, like 112-oss, 112-non-oss, or 112-update, for the new repositories in the above command.
- Search for updated openSUSE 11.2 compatible third-party repositories and add them.
- Warning: Use with caution. Using third-party repositories could increase the chances that the upgrade will not complete correctly.
zypper -n <name> ar <url> <alias> # or: zypper ar <url.repo> # if you have URL of a .repo file
3. Then perform the following commands in this order.
zypper refresh # Refresh the local metadata and repo contents zypper in zypper # Pull in zypper from the 11.2 repository.
- The number of dependencies on libzypp will result in an update to quite a few packages with this simple command. If it suggests to remove a lot packages, that you don't want to see removed, add --no-force-resolution to the command (or enter p at the Continue? prompt) to see why zypper wants to remove them or to choose other solutions.
- If you run into errors during 'zypper refresh', see Upgrade/Supported#Workarounds below.
4. Now execute full distribution update.
- First, let zypper download all required packages:
zypper dup -d
- Please double check that the relevant partition holding /var/ does have enough free space (as reported by the above command).
- After all the required packages have been downloaded, we can do a system upgrade safely:
zypper dup
Known Issues
Some %post install scripts in packages still rely on YAST_IS_RUNNING=instsys environment variable or cause problems when this variable is not set. If you come across such problem, please report it in bugzilla. To work around the problem, you can try setting the variable for the before issuing zypper dup command. If you do, you need to run SuSEConfig after the zypper dup
YAST_IS_RUNNING=instsys zypper dup # Install the packages SuSEconfig # Run SuSEConfig, then reboot
Setting YAST_IS_RUNNING skips individual package post-install SuSEConfig calls, avoiding a bug that may cause X clients to die during the update, and leaving the system unusable if zypper is running in an X client window.
This procedure can also significantly speed the installation up until feature 305472 is ready.
Graphical Tool
For detailed instructions see Wagon and more specifically Upgrading from 11.1 to 11.2 via Wagon.
- ensure you have yast2-wagon installed
- ensure you have only 11.2 repositories enabled
- start YaST2 wagon
- follow the dialogs
- reboot
Sub-features
- Feature 305624: Allow downloading all packages before installing
- Avoid downloading unchanged rebuilt packages
- Enable aria2 for better download reliability
Testing
- openSUSE 11.1 with updates applied, try to migrate to factory.
Expected result: the system should be running without undocumented regressions - Development testing: track factory via the supported tool
Open issues
- Need a CLI tool / script to assist in repository management step of upgrade, or have
zypper dupaddress this directly. - SUSEconfig.
- How should a bug report related to this look like, what information do we need ?
- How to test is underspecified.
- If you are behind a Proxy you need to
export ZYPP_ARIA2C=0thanks to Edinardo Potrich. - I just tried this upgrade; I couldn't use the graphic login until I edited /etc/X11/xorg.conf by hand and uncommented the Option "AutoAddDevices" "off" line. Wasn't clear to me how to report the bug, so here it is.
- It is probably Bug #551929 --Bmwiedemann 14:04, 16 November 2009 (UTC)
Workarounds
- Adding the repo-oss and repo-non-oss repositories as above resulted in an error during 'zypper refresh':
Retrieving repository 'openSUSE-11.2 Non-OSS' metadata [error] Repository 'openSUSE-11.2 Non-OSS' is invalid. Can't read public key from /var/cache/zypp/raw/112-repo-non-ossUVzbjU/repodata/repomd.xml.key, file not found Please check if the URIs defined for this repository are pointing to a valid repository. Skipping repository 'openSUSE-11.2 Non-OSS' because of the above error. Retrieving repository 'openSUSE-11.2 OSS' metadata [error] Repository 'openSUSE-11.2 OSS' is invalid. Can't read public key from /var/cache/zypp/raw/112-repo-ossCGwk6a/repodata/repomd.xml.key, file not found Please check if the URIs defined for this repository are pointing to a valid repository. Skipping repository 'openSUSE-11.2 OSS' because of the above error. Repository 'openSUSE-11.2 Updates' is up to date. Some of the repositories have not been refreshed because of an error.
Strangely, the following worked for me: Add temporary repositories repo-oss-temp and repo-non-oss-temp. Notice that the url points to the 'suse/' subdirectory.
zypper addrepo --name "openSUSE-11.2 OSS" http://download.opensuse.org/distribution/11.2/repo/oss/suse/ repo-oss-temp zypper addrepo --name "openSUSE-11.2 Non-OSS" http://download.opensuse.org/distribution/11.2/repo/non-oss/suse/ repo-non-oss-temp zypper addrepo --name "openSUSE-11.2 Updates" http://download.opensuse.org/update/11.2/ repo-update
Now update zypper as above
zypper refresh zypper in zypper
Now replace the temporary repositories by the usual ones.
zypper addrepo --name "openSUSE-11.2 OSS" http://download.opensuse.org/distribution/11.2/repo/oss/suse/ repo-oss zypper addrepo --name "openSUSE-11.2 Non-OSS" http://download.opensuse.org/distribution/11.2/repo/non-oss/suse/ repo-non-oss zypper rr repo-oss-temp repo-non-oss-temp
Done. Continue as above.

