OpenSUSE Upgrade

From The Dumping Ground

Note: This example is for upgrading from 12.2 to 12.3. Other level upgrades should follow the same process.

How To Upgrade OpenSUSE 12.2 To 12.3 (Desktop & Server)

Preliminary Note

The upgrade can be done on the command line or via the YaST module Wagon (if you are on an OpenSUSE desktop). Since the Wagon method is less tested than the command line update, we will use the command line method here for both servers and desktops.

Installing the Latest Updates

Before we do the distribution upgrade, we install the latest updates for OpenSUSE 12.2. Open a terminal/command line window and run

zypper repos --uri

to check what repositories are used and enabled on the system. Make sure that the line that contains http://download.opensuse.org/update/12.2/ in the URI column reads Yes in the Enabled column (in this example the Alias is repo-update and the Name is openSUSE-12.2-Update, but these values can differ; the important column is the URI column):

server1:~ # zypper repos --uri
#  | Alias                     | Name                                                                   | Enabled | Refresh | URI
---+---------------------------+------------------------------------------------------------------------+---------+---------+--------------------------------------------------------------------------------
 1 | apache-third-party-12.2   | Third-party modules for the Apache HTTP server. (Apache_openSUSE_12.2) | Yes     | No      | http://download.opensuse.org/repositories/Apache:/Modules/Apache_openSUSE_12.2/
 2 | openSUSE-12.2-1.6         | openSUSE-12.2-1.6                                                      | Yes     | No      | cd:///?devices=/dev/disk/by-id/ata-VBOX_CD-ROM_VB2-01700376,/dev/sr0
 3 | repo-debug                | openSUSE-12.2-Debug                                                    | No      | Yes     | http://download.opensuse.org/debug/distribution/12.2/repo/oss/
 4 | repo-debug-update         | openSUSE-12.2-Update-Debug                                             | No      | Yes     | http://download.opensuse.org/debug/update/12.2/
 5 | repo-debug-update-non-oss | openSUSE-12.2-Update-Debug-Non-Oss                                     | No      | Yes     | http://download.opensuse.org/debug/update/12.2-non-oss/
 6 | repo-non-oss              | openSUSE-12.2-Non-Oss                                                  | Yes     | Yes     | http://download.opensuse.org/distribution/12.2/repo/non-oss/
 7 | repo-oss                  | openSUSE-12.2-Oss                                                      | Yes     | Yes     | http://download.opensuse.org/distribution/12.2/repo/oss/
 8 | repo-source               | openSUSE-12.2-Source                                                   | No      | Yes     | http://download.opensuse.org/source/distribution/12.2/repo/oss/
 9 | repo-update               | openSUSE-12.2-Update                                                   | Yes     | Yes     | http://download.opensuse.org/update/12.2/
10 | repo-update-non-oss       | openSUSE-12.2-Update-Non-Oss                                           | Yes     | Yes     | http://download.opensuse.org/update/12.2-non-oss/server1:~ #


(If the line reads No in the Enabled column, enable the repository as follows:

zypper modifyrepo --enable repo-update 

repo-update refers to the Alias column; if the Alias column reads something like http-download.opensuse.org-82ba1b08, for example, the command would be

zypper modifyrepo --enable http-download.opensuse.org-82ba1b08 

If there's no repository with the URI http://download.opensuse.org/update/12.2/, then add the repository as follows:

zypper addrepo --check --name 'openSUSE-12.2-Update' http://download.opensuse.org/update/12.2/ repo-update 

) Now install the latest upfates:

zypper refresh
zypper update

Doing The Distribution Upgrade

Now that the latest updates are installed, disable all OpenSUSE 12.2 repositories...

zypper modifyrepo --all --disable

... and enable the OpenSUSE 12.3 repositories:

zypper addrepo --name "openSUSE-12.3 OSS" http://download.opensuse.org/distribution/12.3/repo/oss/ repo-12.3-oss
zypper addrepo --name "openSUSE-12.3 Non-OSS" http://download.opensuse.org/distribution/12.3/repo/non-oss/ repo-12.3-non-oss
zypper addrepo --name "openSUSE-12.3 Updates" http://download.opensuse.org/update/12.3/ repo-12.3-update

(If the zypper repos --uri command from chapter 2 displayed any third-party repositories, please check if these third-party repositories are available for OpenSUSE 12.3 as well; if they are, add them as follows:

zypper addrepo --name <name> <url> <alias> 

For example, if you use the VirtualBox repository...

server1:~ # zypper repos --uri
# | Alias           | Name                              | Enabled | Refresh | URI
--+-----------------+-----------------------------------+---------+---------+------------------------------------------------------------
...
7 | virtualbox      | VirtualBox for openSUSE 11.4-12.2 | Yes     | Yes     | http://download.virtualbox.org/virtualbox/rpm/opensuse/11.4
server1:~ #

... enable the VirtualBox repository for OpenSUSE 12.3 as follows:

zypper addrepo --name "VirtualBox for openSUSE 12.3" http://download.virtualbox.org/virtualbox/rpm/opensuse/12.3 virtualbox-12.3

At the time of this writing, there was no VirtualBox repository for OpenSUSE 12.3, but this is just an example of how you'd do it. Use values for Name and Alias that are not in use yet.) Now run the full distribution upgrade:

zypper ref
zypper dup

At the end, reboot the system...

reboot

How-To In-Place Upgrade From openSUSE 12.1 to 12.2

Following along in my line of “Readers Digest” versions of the official Opensuse upgrades procedures, (here are a couple of my past ones: 11.1, 11.2, 11.4, 12.1) here’s the latest for upgrading in-place from 12.1 to 12.2:

zypper modifyrepo --all --disable
zypper addrepo --name "openSUSE-12.2 OSS" http://download.opensuse.org/distribution/12.2/repo/oss/ repo-12.2-oss
zypper addrepo --name "openSUSE-12.2 Non-OSS" http://download.opensuse.org/distribution/12.2/repo/non-oss/ repo-12.2-non-oss
zypper addrepo --refresh --name "openSUSE-12.2 Updates" http://download.opensuse.org/update/12.2/ repo-12.2-update
zypper ref
zypper dup --download "in-advance"

I like to use the “in-advance” setting so I can be sure all the packages are downloaded before the upgrade begins. You just never know when there might be a power outage… Of course, if you were using alternative repos, you might want to add those back too. For instance, if you had the google-chrome repo, you’d enter this command to re-enable it:

zypper mr -e google-chrome

…you can find the rest of your disabled repos (from the first step above) with this command:

zypper sl

Afterward, you might want to remove your disabled 12.1-based repos, since you no longer need them. So based on the list from the command above, you can remove them in one command. Here’s the command I used to remove all my 12.1 repos on a machine that was upgraded in-place like this in the past:

zypper rr repo-12.1-non-oss repo-12.1-oss repo-12.1-update

…and here’s the command I used on a machine that had OpenSUSE 12.1 installed fresh:

zypper rr Updates-for-openSUSE-12.1-12.1-1.4 openSUSE-12.1-12.1-1.4 repo-debug repo-debug-update repo-non-oss repo-source

…of course your repos may be different so make sure to check the list and remove only the old one that you don’t want.