How To Upgrade To openSUSE 42.1 From openSUSE 13.2

opensuse_42.1

openSUSE Leap 42.1 final edition has been released a week ago. In this tutorial, we will see how to upgrade to openSUSE 42.1 from openSUSE 13.2. As you might know, You can only upgrade to the next available release. Hopping over a release, e.g., going from 13.1 -> 42.1, is not supported. In case you have openSUSE 13.1 system, you must first upgrade it to openSUSE 13.2 version and continue to upgrade to 42.1.

To upgrade openSUSE 13.1 to 13.2, refer the following link.

Preliminary notes

We strongly recommend you to backup all important data before starting the upgrade process. Be mindful that if your upgrade process stops due to power or Internet failure, you will be resulted with a unstable or broken system. So make sure that have an uninterrupted power supply and stable Internet connection. If you consider to upgrade multiple systems, then it would be better to download an ISO image and install them one by one.

Update The System

All set? Well, let us start the upgrade procedure.

To find the current running openSUSE version, enter the following command:

cat /etc/os-release

Sample output:

NAME=openSUSE
VERSION="13.2 (Harlequin)"
VERSION_ID="13.2"
PRETTY_NAME="openSUSE 13.2 (Harlequin) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:13.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"

Well, let us begin to upgrade from openSUSE 13.2 to 42.1. Disable all OBS repositories or any third party repositories first, perform the upgrade, then re-enable them.

First let us check whether the update repository exists and enabled. To do that enter the following command in Terminal:

zypper repos --uri

Sample Output:

# | Alias               | Name                         | Enabled | Refresh | URI                                                         
--+---------------------+------------------------------+---------+---------+-------------------------------------------------------------
1 | repo-non-oss        | openSUSE-13.2-Non-Oss        | Yes     | Yes     | http://download.opensuse.org/distribution/13.2/repo/non-oss/
2 | repo-oss            | openSUSE-13.2-Oss            | Yes     | Yes     | http://download.opensuse.org/distribution/13.2/repo/oss/    
3 | repo-update         | openSUSE-13.2-Update         | Yes     | Yes     | http://download.opensuse.org/update/13.2/                   
4 | repo-update-non-oss | openSUSE-13.2-Update-Non-Oss | Yes     | Yes     | http://download.opensuse.org/update/13.2-non-oss/

As you see above, the openSUSE-13.2-Update repository is available, and enabled. If it is not enabled, enable it using command:

zypper modifyrepo --enable repo-update

If update repository doesn’t exist, you can add it using the following command:

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

Now update your current version to latest packages using commands:

sudo zypper refresh
sudo zypper update

It will take a while depending upon your Internet connection speed. Please be patient.

skopensuse : sudo – Konsole_001

skopensuse : tmux – Konsole_002

skopensuse : tmux – Konsole_003

After updating the system, reboot it to apply the new changes.

Upgrade

As I mentioned already, disable any third party or OBS repositories before proceed to upgrade.

To list the current available repositories, enter the following command.

zypper lr

Sample output:

# | Alias               | Name                         | Enabled | Refresh
--+---------------------+------------------------------+---------+--------
1 | repo-non-oss        | openSUSE-13.2-Non-Oss        | Yes     | Yes    
2 | repo-oss            | openSUSE-13.2-Oss            | Yes     | Yes    
3 | repo-update         | openSUSE-13.2-Update         | Yes     | Yes    
4 | repo-update-non-oss | openSUSE-13.2-Update-Non-Oss | Yes     | Yes

If you have any third party repository, then remove it using command:

zypper rr <alias>

You might want to backup your current repositories. To do that enter the following command to backup all your current repositories.

sudo cp -Rv /etc/zypp/repos.d /etc/zypp/repos.d.bak

Then change all repositories to new version. Here i am going to upgrade openSUSE 13.2 to 42.1, so the command will be:

sudo sed -i 's/13\.2/leap\/42\.1/g' /etc/zypp/repos.d/*

Now check if all repositories changed to new version.

zypper lr

Sample output:

# | Alias | Name | Enabled | GPG Check | Refresh
--+---------------------+-----------------------------------+---------+-----------+--------
1 | repo-non-oss | openSUSE-leap/42.1-Non-Oss | Yes | ( p) Yes | Yes 
2 | repo-oss | openSUSE-leap/42.1-Oss | Yes | ( p) Yes | Yes 
3 | repo-update | openSUSE-leap/42.1-Update | Yes | ( p) Yes | Yes 
4 | repo-update-non-oss | openSUSE-leap/42.1-Update-Non-Oss | Yes | ( p) Yes | Yes

As you see in the above output, all repositories has been changed to 42.1 version.

Now update the repository list with following command:

sudo zypper ref

Note: The “repo-update” and “repo-update-non-oss” repositories are not worked at the time of upgrading openSUSE 42.1. Because the path mentioned in repo files are wrong. So, I removed them and added the correct repositories.

To remove the “repo-update” and “repo-update-non-oss” repositories, run the following commands:

sudo zypper rr repo-update
sudo zypper rr repo-update-non-oss

Add the correct repositories:

sudo zypper addrepo --check --refresh --name 'openSUSE-42.1-Update' http://download.opensuse.org/update/leap/42.1/oss/ repo-update
sudo zypper addrepo --check --refresh --name 'openSUSE-42.1-Update-Non-Oss' http://download.opensuse.org/update/leap/42.1/non-oss/ repo-update-non-oss

Update the repository lists:

sudo zypper ref

Now, the upgrade task. It is strongly recommended that you should run this upgrade inside tmux to protect the upgrade process in case anything goes wrong with the X session during the upgrade. tmux package is available in the main openSUSE repositories.

Install it using command:

sudo zypper in tmux

Finally, it is time to upgrade. Enter the following command in Terminal to switch to tmux.

tmux

Enter the following command in terminal to start the upgrade.

sudo zypper dup

In case ‘dup’ command doesn’t work, simply run the ‘update’ command. In my case, sypper dup shows too many dependencies issues. So, I began the upgrade process using the following command.

sudo zypper update

sk@sk: ~_001

After downloading all packages, the following error showed up. Simply type “Yes” to continue upgrade process.

File /usr/lib64/libgpm.so.2.1.0
 from install of
 gpm-1.20.7-8.4.x86_64(openSUSE-leap/42.1-Oss)
 conflicts with file from package
 libgpm2-1.20.7-7.1.2.x86_64(@System) 

File conflicts happen when two packages attempt to install files with the same name but different contents. If you continue, conflicting files will be replaced losing the previous content.
Continue? [yes/no] (no): yes

sk@sk: ~_001

After upgrade, reboot your system to log in to new openSUSE 42.1 version.

openSUSE 13.2 Desktop [Running] – Oracle VM VirtualBox_003

Here is it is how openSUSE 42.1 Leap edition desktop looks like.

openSUSE 13.2 Desktop [Running] – Oracle VM VirtualBox_005

As I mentioned above, to find the current version of openSUSE, run the following command from the Terminal:

cat /etc/os-release

Sample output:

NAME="openSUSE Leap"
VERSION="42.1"
VERSION_ID="42.1"
PRETTY_NAME="openSUSE Leap 42.1 (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:42.1"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"

Please be mindful that if upgrade process terminate due to power or Internet failure, then you’ll be end up with broken system. So, It is important to run the upgrade process with uninterrupted power supply and fast Internet connection speed.

In my personal opinion, the desktop upgrade process takes too much time. Also, make sure your hard disk has sufficient free space, or else you’ll be end up with “Write error Error message: Failed writing body (94 != 1440)” error message. openSUSE upgrade process is definitely not as easy as Ubuntu or other distribution upgrade methods.

You might want to read our complete review about openSUSE 42.1 from the link given below.

I will be here again with an interesting article. Stay tuned.

Good Luck!