Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to openSUSE Leap 15.3

13 Upgrading the system and system changes Edit source

Abstract

You can upgrade an existing system without completely reinstalling it. There are two types of renewing the system or parts of it: updating individual software packages and upgrading the entire system. Updating individual packages is covered in Chapter 10, Installing or removing software and Chapter 12, YaST online update. Two ways to upgrade the system are discussed in the following sections— see Section 13.1.3, “Upgrading with YaST” and Section 13.1.4, “Distribution upgrade with Zypper”.

13.1 Upgrading the system Edit source

Important
Important: openSUSE Leap 15.3 is only available as 64-bit version

openSUSE Leap 15.3 is only available as 64-bit version. Upgrading 32-bit installations to 64-bit is not supported. Please follow the instructions in Chapter 1, Installation Quick Start and Chapter 3, Installation steps to install openSUSE Leap on your computer or consider switching to openSUSE Tumbleweed.

The release notes are bundled in the installer, and you may also read them online at openSUSE Leap Release Notes.

Software tends to grow from version to version. Therefore, take a look at the available partition space with df before updating. If you suspect you are running short of disk space, secure your data before you update and repartition your system. There is no general rule regarding how much space each partition should have. Space requirements depend on your particular partitioning profile, the software selected, and the version numbers of the system.

13.1.1 Preparations Edit source

Before upgrading, copy the old configuration files to a separate medium (such as removable hard disk or USB flash drive) to secure the data. This primarily applies to files stored in /etc as well as some of the directories and files in /var. You may also want to write the user data in /home (the HOME directories) to a backup medium. Back up this data as root. Only root has read permission for all local files.

Before starting your update, make note of the root partition. The command df / lists the device name of the root partition. In Example 13.1, “List with df -h, the root partition to write down is /dev/sda3 (mounted as /).

Example 13.1: List with df -h
Filesystem     Size  Used Avail Use% Mounted on
/dev/sda3       74G   22G   53G  29% /
udev           252M  124K  252M   1% /dev
/dev/sda5      116G  5.8G  111G   5% /home
/dev/sda1       39G  1.6G   37G   4% /windows/C
/dev/sda2      4.6G  2.6G  2.1G  57% /windows/D

13.1.2 Possible problems Edit source

If you upgrade a default system from the previous version to this version, YaST works out the necessary changes and performs them. Depending on your customization, some steps (or the entire upgrade procedure) may fail and you must resort to copying back your backup data. Check the following issues before starting the system update.

13.1.2.1 Checking passwd and group in /etc Edit source

Before upgrading the system, make sure that /etc/passwd and /etc/group do not contain any syntax errors. For this purpose, start the verification utilities pwck and grpck as root to eliminate any reported errors.

13.1.2.2 Shut down virtual machines Edit source

If your machine serves as a VM Host Server for KVM or Xen, make sure to properly shut down all running VM Guests prior to the update. Otherwise you may not be able to access the guests after the update.

13.1.2.3 PostgreSQL Edit source

Before updating PostgreSQL (postgres), dump the databases. See the manual page of pg_dump. This is only necessary if you actually used PostgreSQL prior to your update.

13.1.3 Upgrading with YaST Edit source

Following the preparation procedure outlined in Section 13.1.1, “Preparations”, you can now upgrade your system:

  1. Insert the openSUSE Leap DVD into the drive, then reboot the computer to start the installation program. On machines with a traditional BIOS you will see the graphical boot screen shown below. On machines equipped with UEFI, a slightly different boot screen is used. Secure boot on UEFI machines is supported.

    Use F2 to change the language for the installer. A corresponding keyboard layout is chosen automatically. See Section 2.2.1, “The boot screen on machines equipped with traditional BIOS” or Section 2.2.2, “The boot screen on machines equipped with UEFI” for more information about changing boot parameters.

    Boot screen
  2. Select Upgrade on the boot screen, then press Enter. This boots the system and loads the openSUSE Leap installer. Do not select Installation.

  3. The Language and Keyboard Layout are initialized with the language settings you have chosen on the boot screen. Change them here, if necessary.

    Read the License Agreement. It is presented in the language you have chosen on the boot screen. License Translations are available. Proceed with Next.

    License agreement
  4. YaST determines if there are multiple root partitions. If there is only one, continue with the next step. If there are several, select the right partition and confirm with Next (/dev/sda3 was selected in the example in Section 13.1.1, “Preparations”). YaST reads the old fstab on this partition to analyze and mount the file systems listed there.

    Partioning
    Tip
    Tip: Release notes

    From this point on, the Release Notes can be viewed from any screen during the installation process by selecting Release Notes.

  5. YaST shows a list of Previously Used Repositories. By default all repositories will get removed. If you had not added any custom repositories, do not change the settings. The packages for the upgrade will be installed from DVD and you can optionally enable the default online repositories can be chosen in the next step.

    If you have had added custom repositories, for example from the openSUSE Build Service, you have two choices:

    • Leave the repository in state Removed. Software that was installed from this repository will get removed during the upgrade. Use this method if no version of the repository that matches the new openSUSE Leap version, is available.

    • Update and enable the repository. Use this method if a version that matches the new openSUSE Leap version is available for the repository. Change it's URL by clicking the repository in the list and then Change. Enable the repository afterwards by clicking Toggle Status until it is set to Enable.

    Do not use repositories matching the previous version unless you are absolutely sure they will also work with the new openSUSE version. If not, the system may be unstable or not work at all.

    Upgrade of repositories
  6. In case an Internet connection is available, you may now activate optional online repositories. Please enable all repositories you had enable before to ensure all packages get upgraded correctly. Enabling the update repositories is strongly recommended—this will ensure that you get the latest package versions available, including ll security updates and fixes.

    Uprade of repositories

    After having proceeded with Next, you need to confirm the license agreement for the online repositories with Next.

  7. Use the Installation Settings screen to review and—if necessary—change several proposed installation settings. The current configuration is listed for each setting. To change it, click the headline.

    System

    View detailed hardware information by clicking System. In the resulting screen you can also change Kernel Settings—see Section 3.11.7, “System for more information.

    Update options

    By default, YaST will update perform full Update with Installation of New Software and Features based on a selection of patterns. Each pattern contains several software packages needed for specific functions (for example, Web and LAMP server or a print server).

    Here you can change the package selection or change the Update Mode to Only Update Installed Packages.

    Packages

    You can further tweak the package selection on the Packages screen. Here you can not only select patterns but also list their contents and search for individual packages. See Chapter 10, Installing or removing software for more information.

    If you intend to enhance your system, it is recommended to finish the upgrade first and then install additional software.

    Backup

    You also have the possibility to make backups of various system components. Selecting backups slows down the upgrade process. Use this option if you do not have a recent system backup.

    Language

    This section allows you to change the Primary Language and configure additional Secondary Languages. Optionally, you can adjust the keyboard layout and timezone to the selected primary language.

    Keyboard layout

    Here you can change the keyboard layout and adjust additional Expert Keyboard Settings.

    Booting

    This section shows the boot loader configuration. Changing the defaults is only recommended if really needed. Refer to Book “Reference”, Chapter 12 “The boot loader GRUB 2” for details.

    Upgrade summary
  8. After you have finalized the system configuration on the Installation Settings screen, click Update. Depending on your software selection you may need to agree to license agreements before the installation confirmation screen pops up. Up to this point no changes have been made to your system. After you click Update a second time, the upgrade process starts.

    Upgrade confirmation

Once the basic upgrade installation is finished, YaST reboots the system. Finally, YaST updates the remaining software, if any and displays the release notes, if wanted.

13.1.4 Distribution upgrade with Zypper Edit source

With the zypper command line utility you can upgrade to the next version of the distribution. Most importantly, you can initiate the system upgrade process from within the running system.

This feature is attractive for advanced users who want to run remote upgrades or upgrades on many similarly configured systems.

13.1.4.1 Preparing the upgrade with Zypper Edit source

To avoid unexpected errors during the upgrade process using zypper, minimize risky constellations.

  • Quit as many applications and stop unneeded services as possible and log out all regular users.

  • Disable third-party repositories before starting the upgrade, or lower the priority of these repositories to make sure packages from the default system repositories will get preference. Enable them again after the upgrade and edit their version string to match the version number of the distribution of the upgraded now running system.

13.1.4.2 The upgrade procedure Edit source

Warning
Warning: Check your system backup

Before actually starting the upgrade procedure, check that your system backup is up-to-date and restorable. This is especially important because you need to enter many of the following steps manually.

The program zypper supports long and short command names. For example, you can abbreviate zypper install as zypper in. In the following text, the short variants are used.

  1. Run the online update to make sure the software management stack is up-to-date:

    > sudo zypper patch
  2. Configure the repositories you want to use as update sources. Getting this right is crucial. Either use YaST (see Section 10.3, “Managing software repositories and services”) or zypper (see Book “Reference”, Chapter 2 “Managing software with command line tools”, Section 2.1 “Using Zypper”) in this example. The name of the repositories used in the following steps may vary depending on the customization of your OS.

    To view your current repositories enter:

    > zypper --releasever=15.3 lr -u
  3. In the result of the previous command, check the last column (URL). All repository links should contain 15.3 or openSUSE_Leap_15.3 as a version number. If this is not the case, proceed as follows:

    1. Decide whether this repository is still needed. If not, delete it using the following command:

      > sudo zypper rr NAME

      Repeat this for all repositories you no longer need.

    2. In case you still need a repository, continue as follows.

      For third-party repositories that do not include a version number, check with the provider of the repository whether openSUSE Leap 15.3 is supported. If so, keep the repository. If not, remove it as described above.

      All remaining repositories you want to keep need to be updated to the new version. For this you need to remove the old version and add the new one. This procedure is done in the following with an example repository that has the following data:

      Name: M17N:fonts
      URI: https://download.opensuse.org/repositories/M17N:/fonts/openSUSE_Leap_15.2/
      1. Remove the old repository:

        > sudo zypper rr "M17N:fonts"
      2. Add the new repository:

        > sudo zypper ar -f \
        https://download.opensuse.org/repositories/M17N:/fonts/openSUSE_Leap_15.3/ \
        "M17N:fonts"
      3. Repeat this step for every repository that needs to be lifted to the new version.

        If adding a new repository fails, check in your browser whether the URL is correct. If not, a new version of the repository may not exist yet. Deactivate the repository and try again later. Packages from deactivated repositories will not be removed if all dependencies are still fulfilled.

        > sudo zypper mr -d NAME
  4. Finally, check the current repository configuration again

    > sudo zypper --releasever=15.3 lr -u

    All repositories should now point to a 15.3 version (except for third-party repositories without versioning that support new releases). Repositories still pointing to an old version should at least be disabled (the column Enabled needs to show No).

  5. Update the repository metadata by running:

    > sudo zypper --releasever=15.3 ref
  6. Start the distribution upgrade that will lift your system to the new version:

    > sudo zypper --releasever=15.3 dup

    Depending on the software selection you may need to approve one or more licenses. Check the output of the command. If everything is OK, approve with y.

  7. Finally, restart your machine to boot into the new openSUSE Leap version:

    > sudo shutdown -r now

You can upgrade your system by using zypper dup. When using this command, take the following into account:

  • If you are using zypper dup and there is not enough disk space available, the upgrade fails. In this case, use --pkg-cache-dir DIR to set an alternative package cache directory.

  • All packages with unresolved dependencies will be removed. Packages installed from disabled repositories are kept as long as their dependencies are satisfied. Packages that are no longer available in the repositories are considered orphaned. Such packages are uninstalled if their dependencies cannot be satisfied. If they can be satisfied, such packages stay installed.

  • zypper dup ensures that all installed packages come from one of the available repositories. It does not consider the version or architecture, but prevents changing the vendor of the installed packages by default, using the --no-allow-vendor-change option. If you have third-party repositories enabled, some repositories may break during the upgrade. In this case, use --allow-vendor-change instead.

13.1.5 Updating individual packages Edit source

Regardless of your overall updated environment, you can always update individual packages. From this point on, however, it is your responsibility to ensure that your system remains consistent.

Use the YaST software management tool to update packages as described in Chapter 10, Installing or removing software. Select components from the YaST package selection list according to your needs. If a newer version of a package exists, the version numbers of the installed and the available versions are listed in blue color in the Installed (Available) column. If you select a package essential for the overall operation of the system, YaST issues a warning. Such packages should be updated only in the update mode. For example, many packages contain shared libraries. Updating these programs and applications in the running system may lead to system instability.

13.2 More information Edit source

Problems and special issues of the various versions are published online as they are identified. See the links listed below. Important updates of individual packages can be accessed using the YaST Online Update. For more information, see Chapter 12, YaST online update.

Refer to the Product highlights (https://en.opensuse.org/Product_highlights and the Bugs article in the openSUSE wiki at https://en.opensuse.org/openSUSE:Most_annoying_bugs for information about recent changes and issues.

Print this page