Suse linux обновить 12

22 Upgrading Online #

SUSE offers an intuitive graphical and a simple command line tool to upgrade a running system to a new service pack. They provide support for “ rollback ” of service packs and more. This chapter explains how to do a service pack upgrade step by step with these tools.

22.1 Conceptual Overview #

SUSE releases new service packs for the SUSE Linux Enterprise family at regular intervals. To make it easy for customers to migrate to a new service pack and minimize downtime, SUSE supports migrating online while the system is running.

Starting with SLE 12, YaST Wagon has been replaced by YaST migration (GUI) and Zypper migration (command line). The following features are supported:

  • System always in a defined state until the first RPM is updated
  • Canceling is possible until the first RPM is updated
  • Simple recovery, if there is an error
  • “ Rollback ” via system tools; no backup/restore needed
  • Use of all active repositories
  • The ability to skip a service pack

If the system to upgrade is a SUSE Manager client, it cannot be upgraded by YaST online migration or zypper migration . Use the Client Migration procedure instead. It is described in the SUSE Manager Upgrade Guide, available at https://documentation.suse.com/suma/.

22.2 Service Pack Migration Workflow #

A service pack migration can be executed by either YaST, zypper , or AutoYaST.

Before you can start a service pack migration, your system must be registered at the SUSE Customer Center or a local SMT server. SUSE Manager can also be used.

Regardless of the method, a service pack migration consists of the following steps:

  1. Find possible migration targets on your registered systems.
  2. Select one migration target.
  3. Request and enable new repositories.
  4. Run the migration.

The list of migration targets depends on the products you have installed and registered. If you have an extension installed for which the new SP is not yet available, it could be that no migration target is offered to you.

The list of migration targets available for your host will always be retrieved from the SUSE Customer Center and depend on products or extensions installed.

Читайте также:  Закрыть окно горячие клавиши linux

22.3 Canceling Service Pack Migration #

A service pack migration can only be cancelled at specific stages during the migration process:

  1. Until the package upgrade starts, there are only minimal changes on the system, like for services and repositories. Restore /etc/zypp/repos.d/* to revert to the former state.
  2. After the package upgrade starts, you can revert to the former state by using a Snapper snapshot (see Chapter 7, System Recovery and Snapshot Management with Snapper).
  3. After the migration target was selected, SUSE Customer Center changes the repository data. To revert this state manually, use SUSEConnect —rollback .

22.4 Upgrading with the Online Migration Tool (YaST) #

To perform a service pack migration with YaST, use the Online Migration tool. By default, YaST does not install any packages from a third-party repository. If a package was installed from a third-party repository, YaST prevents packages from being replaced with the same package coming from SUSE.

When performing the SP migration, YaST will install all recommended packages. Especially in the case of custom minimal installations, this may increase the installation size of the system significantly.

To change this default behavior and allow only required packages, adjust the solver.onlyRequires option in /etc/zypp/zypp.conf .

Also, edit the file /etc/zypp/zypper.conf and change the installRecommends option.

This changes the behavior of all package operations, such as the installation of patches or new packages.

To start the service pack migration, do the following:

  1. Deactivate all unused extensions on your registration server to avoid future dependency conflicts. In case you forget an extension, YaST will later detect unused extension repositories and deactivate them.
  2. If you are logged in to a GNOME session running on the machine you are going to update, switch to a text console. Running the update from within a GNOME session is not recommended. Note that this does not apply when being logged in from a remote machine (unless you are running a VNC session with GNOME).
  3. If you are an LTSS subscriber, you must deactivate the LTSS repository. This cannot be done with YaST. Instead, run these commands, using the version number of the installed repository:
tux > sudo SUSEConnect -d -p SLES-LTSS/12.2/x86_64 tux > sudo zypper ref -s

22.5 Upgrading with Zypper #

To perform a service pack migration with Zypper, use the command line tool zypper migration from the package zypper-migration-plugin .

Читайте также:  Linux find package name

When performing the SP migration, YaST will install all recommended packages. Especially in the case of custom minimal installations, this may increase the installation size of the system significantly.

To change this default behavior and allow only required packages, adjust the solver.onlyRequires option in /etc/zypp/zypp.conf .

Also, edit the file /etc/zypp/zypper.conf and change the installRecommends option.

This changes the behavior of all package operations, such as the installation of patches or new packages. To change the behavior of Zypper for a single invocation, add the parameter —no-recommends to your command line.

To start the service pack migration, do the following:

  1. If you are logged in to a GNOME session running on the machine you are going to update, switch to a text console. Running the update from within a GNOME session is not recommended. Note that this does not apply when being logged in from a remote machine (unless you are running a VNC session with GNOME).
  2. Register your SUSE Linux Enterprise machine if you have not done so:
sudo SUSEConnect --regcode YOUR_REGISTRATION_CODE
tux > sudo SUSEConnect -d -p SLES-LTSS/12.2/x86_64 tux > sudo zypper ref -s
sudo zypper in zypper-migration-plugin
tux > sudo zypper migration Executing 'zypper patch-check' Refreshing service 'SUSE_Linux_Enterprise_Server_12_x86_64'. Loading repository data. Reading installed packages. 0 patches needed (0 security patches) Available migrations: 1 | SUSE Linux Enterprise Server 12 SP1 x86_64 2 | SUSE Linux Enterprise Server 12 SP2 x86_64
  • If more than one migration target is available for your system, Zypper allows you to select one SP from the list. This is the same as skipping one or more SPs. Keep in mind, online migration for base products (SLES, SLED) remains available only between the SPs of a major version.
  • By default, Zypper uses the option —no-allow-vendor-change which is passed to zypper dup . If a package was installed from a third-party repository, this option prevents packages from being replaced with the same package coming from SUSE.
  • If Zypper finds obsolete repositories coming from DVD or a local server, it is highly recommended to disable them. Old SCC or SMT repositories are removed automatically.
266 packages to upgrade, 54 to downgrade, 17 new, 8 to reinstall, 5 to remove, 1 to change arch. Overall download size: 285.1 MiB. Already cached: 0 B After the operation, additional 139.8 MiB will be used. Continue? [y/n/? shows all options] (y):

22.6 Upgrading with Plain Zypper #

If you cannot use YaST migration or the Zypper migration, you can still migrate with plain Zypper and some manual interactions. To start a service pack migration, do the following:

  1. If you are logged in to a GNOME session running on the machine you are going to update, switch to a text console. Running the update from within a GNOME session is not recommended. Note that this does not apply when being logged in from a remote machine (unless you are running a VNC session with GNOME).
  2. Update the package management tools with the old SUSE Linux Enterprise repositories:
sudo zypper patch --updatestack-only
sudo SUSEConnect --de-register
sudo zypper addrepo REPOSITORY

You can also use SUSE Customer Center or Subscription Management Tool. The command for SUSE Linux Enterprise 12 SP1 on x86-64 is:

sudo SUSEConnect -p SLES/12.2/x86_64 OPTIONS

Keep in mind, cross-architecture upgrades are not supported. Zypper will display a conflict between the old and new kernel. Choose Solution 1 to continue.

Problem: product:SLES-12.2-0.x86_64 conflicts with kernel < 4.4 provided by kernel-default-VERSION Solution 1: Following actions will be done: replacement of kernel-default-VERSION with kernel-default-VERSION deinstallation of kernel-default-VERSION Solution 2: do not install product:SLES-12.2-0.x86_64
sudo zypper ref -f -s sudo zypper dup --no-allow-vendor-change --no-recommends

22.7 Rolling Back a Service Pack #

If a service pack does not work for you, SUSE Linux Enterprise supports reverting the system to the state before the service pack migration was started. Prerequisite is a Btrfs root partition with snapshots enabled (this is the default when installing SLES 12). See Chapter 7, System Recovery and Snapshot Management with Snapper for details.

Читайте также:  Kesl linux обновление баз

All products should be reported as being Registered . If this is not the case, repair the registration by running

Now you have successfully reverted the system to the state that was captured immediately before the service pack migration was started.

Источник

Оцените статью
Adblock
detector