Upgrade/Supported

From openSUSE

< Upgrade(Redirected from Upgrade/11.2)
Geeko 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:

  • 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; the only downtime will be the reboot after the upgrade.
  • You don’t have to waste a DVD, nor do you need a DVD writer.
  • It’s cool.

The disadvantages:

  • If for any reason the upgrade is interrupted (i.e: power outages, network disconnect) and the process can't 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 more interesting to download a DVD.


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.


Warning
This wiki page is in draft form.



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:

  1. Command line – using zypper.
  2. 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
where ‘repo-update’ is the name of the update repository.
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 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.

Before proceeding to an upgrade, please double check that the relevant partition holding /var/ or root (/) does have enough free space (as reported by the above command). If your root or var partition is almost full you can change the directory of downloaded packages for upgrade procedures in the zypper configuration to point to another partition or disk. See how to change the zypper download directory.
First, let zypper download all required packages:
 zypper dup -d
After all the required packages have been downloaded, we can do a system upgrade safely:
 zypper dup

If you have a limited number of existing repositories you want to maintain, another option is to totally delete your repository list altogether. This would occur after zypper in zypper above, but prior to zypper dup -d.

 mv /etc/zypp/repos.d /etc/zypp/repos.d-backup


openSUSE-11.2 was officially released on 2009-11-12. If you did the above before this date, you may have installed a Release Candidate (RC) or milestone version and will need to repeat the final zypper dup step now to receive the GM release.

In addition, zypper dup can be run from time to time to ensure you have the latest available packages from the various repositories that you have been enabled. YOU (Yast Online Update) only addresses security updates of the official repositories.



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.

Warning
It skips also updating bootloader menu, so if this workaround is used then the bootloader configuration must be manually updated (see bug 555323).


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. Keep in mind that the Wagon update is less tested than the method described here.

  1. ensure you have yast2-wagon installed
  2. ensure you have only 11.2 repositories enabled
  3. start YaST2 wagon
  4. follow the dialogs
  5. reboot

Sub-features


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 dup address 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=0 thanks to Edinardo Potrich.
  • If you have the iso images of the new system already it seems to be a good idea to use them as the oss/non-oss repositories instead of the online ones to save bandwidth/faster upgrade. But if you added them as 'iso' repositories there probably will be a problem during upgrade (from 11.1 to 11.2): on zypper dup, packages on the 'remove list' are removed first. In my case this included 'libvolumeid' packages, which were needed by (the old) 'mount' to mount the iso-files for further installation. The solution I used on console then, was to update the package util-linux which contains mount to continue the upgrade. The problem of course is, you need the online repository with higher priority/smaller number temporarily to update this package.
  • In my case the grub setup had to be updated manually.

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.

Changing zypper download directory

  • Close already running zypper or YaST program.
  • Open file /etc/zypp/zypp.conf as user root.
  • Edit or add a new line for packagesdir option. In example:
 packagesdir=/home/src/opensuse.org/repo	 
  • Save the file and exit.
After configuring this option, all downloaded packages by zypper or YaST will be saved in directory pointed by packagesdir.