How to upgrade OpenSUSE Leap 15.1 to 15.2
OpenSUSE Leap 15.2 is the successor to OpenSUSE Leap 15.1. OpenSUSE Leap 15.2 released on 02nd Jul 2020 comes after one year since OpenSUSE Leap 15.1 released on 22nd May 2019. Let’s take a look at how to update 15.1 to 15.2.
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. This guide 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 15.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, Leap 15.1 should be fine, 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 is 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 15.1 and replace it with $releasever. 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 15.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 15.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 get started with Helm 3 - 23 September 2020
- Nvidia to acquire ARM for $40 billion - 16 September 2020
- All you need to know before buying a Raspberry Pi 4 - 9 September 2020