How to upgrade OpenSUSE Leap 42.1 to 42.2
OpenSUSE Leap is a new operating system from SUSE based on SLES. It was initially released on the 4th November 2015 with version number 42.1 . A year later, version 42.2 is out. Let’s take a look at how to upgrade it.
The upgrade process is a complex one. Be sure to have backups of configuration files and data before starting. The following procedure is not official and is not correlated with OpenSUSE Documentation, I wrote it because I found the official one inadequate to common scenarios such as having Packman or third-party repositories installed. This guide also points out difficult situations which I have experienced and the relative fix I have applied.
That said, the following procedure describes a network installation and does not use an external media. The whole process can take up to an hour and can download several GiB depending on your installation.
Before starting you need to meet some requirements in order to avoid complications:
- The precedent installation must be OpenSUSE Leap 42.1 . The procedure can’t be easily reproduced if you skip one version.
- A network connection to the new repositories is needed (a connection to the Internet is just fine. If you use local mirrors, be sure to be able to reach them).
- Ensure /var/cache/zypp is large enough to home your new packages during download.(I had to make space for 2GiB.)
- If you installed OpenSUSE Leap 42.1 following the default partitioning, you will probably have a BTRFS filesystem on / that shares the space with /var. If the root filesystem is small, you could get stuck during the download of the new packages. In case you’re using snapper you might try deleting a few snapshots in order to regain some space. Also, take a look here if you need help with BTRFS.
Step 1: Backup
The first step to take is to make backups. I can’t emphasize this enough: make backups! The /etc folder contains most of the configuration files. The /home directory houses users’ files. The /var directory contains databases, virtual machines images.
In case you’re using BTRFS and snapper you can make a local backup:
Step 2: Update
The next step is to ensure the system is up-to-date
Step 3: Disable third-party repositories
Third-party repositories can cause quite a bit of troubles during this process. I advise you to disable them. Everything that is not directly related to OpenSUSE Leap should be disabled.
Step 4: Update repositories
Now it can be wise to make a local backup of the repositories configuration folder:
Now you need to search and replace inside the zypper repositories configurations. What you need to search is 42.1 and replace it with 42.2. Here’s an example:This has to be repeated for each repository that you want to keep enabled (if you plan to continue using third-party repositories you must change them too!).
Now you can modify the repositories any way you want: manually, with a text editor, using yast. I personally used a single command (although that’s pretty dangerous, and it doesn’t check if everything is right):
Step 5: Perform the update
This step is the decisive one. In this step you will only need to issue one command, and get asked about what you do.
Once this is completed, reboot your system, and you should be seeing (if everything was right) that the version has been bumped to OpenSUSE Leap 42.2.
Step 6: Almost finished
At this point, the procedure should be complete (we still haven’t re-enabled the third-party repositories). If everything is working, and you’re using BTRFS and snapper it is wise to take another snapshot:
At this point, the upgrade procedure is complete, in the next step we’ll re-enable the third-party repositories we disabled earlier.
Step 7: Enable third-party repositories
Now, remember, third-party repositories might not support the new version: OpenSUSE Leap 42.2. But even if they support the new version, a package you installed previously might not be available in the new version. Before re-enabling these repositories, remember to perform the changes described in Step 4.
Latest posts by mark (see all)
- How to install Fedora 30 in 10 easy steps - 22 May 2019
- How to install NextCloud 16 server on CentOS 7.x - 15 May 2019
- How to install NextCloud 16 on Ubuntu 16.04/18.04/18.10/19.04 - 8 May 2019