Глава 16. Upgrading the System and System Changes

Содержание

16.1. Upgrading the System
16.2. For More Information

Аннотация

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 Глава 5, Installing or Removing Software and Глава 6, YaST Online Update. Two ways to upgrade the system are discussed in the following sections— see Раздел 16.1.3, «Upgrading with YaST» and Раздел 16.1.4, «Distribution Upgrade with zypper».

16.1. Upgrading the System

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.

16.1.1. Preparations

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 Пример 16.1, «List with df -h», the root partition to write down is /dev/sda3 (mounted as /).

Пример 16.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

16.1.2. Possible Problems

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 customizations, 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.

16.1.2.1. Checking passwd and group in /etc

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.

16.1.2.2. PostgreSQL

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.

16.1.3. Upgrading with YaST

Following the preparation procedure outlined in Раздел 16.1.1, «Preparations», you can now upgrade your system:

  1. Boot the system as for the installation, described in Раздел “System Start-Up for Installation” (Глава 1, Installation with YaST, ↑Содержание). In YaST, choose a language and select Update in the Installation Mode dialog. Do not select New Installation. Also add repositories to make sure to get all available software updated whenever possible. Find more information about installation repositories in Раздел “Add-On Products” (Глава 1, Installation with YaST, ↑Содержание).

  2. 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 Раздел 16.1.1, «Preparations»). YaST reads the old fstab on this partition to analyze and mount the file systems listed there.

    [Warning]Persistent Device Names

    All entries in /etc/fstab that specify partitions to be mounted using the kernel-device name must be changed to any of the other supported methods prior to performing an update. Kernel-device names are not persistent and are therefore unreliable for use during the update process. This can be done using the YaST System Partitioner by changing the method used in the fstab options settings.

  3. Check the previously used repositories, if there are any. Enable all the repositories you still want to use and from where you want to update third-party software. Click the Toggle Status for every list item, if appropriate.

  4. If you added repositories during the upgrade procedure as recommended above, you now can activate those you are actually interested in.

  5. In the Installation Settings dialog, adjust the settings according to your requirements. Normally, you can leave the default settings untouched. If you intend to enhance your system, however, check the packages and patterns offered in the Packages and Update Options submenus, or add support for additional languages.

    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.

  6. Confirm the upgrade by clicking Start Update.

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.

16.1.4. Distribution Upgrade with zypper

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. Inexperienced users will prefer the upgrade with YaST using a boot medium as described in Раздел 16.1.3, «Upgrading with YaST».

16.1.4.1. Before Starting the Upgrade with zypper

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

Upgrade from the previous version (e.g., 11.3) to this version (11.4)—do not skip any minor version inbetween (this means, do not upgrade from 11.2 or earlier to 11.4 in one go). Make sure all available 11.3 online updates are successfully applied.

Close as many applications and unneeded services as possible and log out all regular users.

Disable third party or Open Build Service 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.

For more information, see http://en.opensuse.org/SDB:System_upgrade.

16.1.4.2. The Upgrade Procedure

[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 must enter many of the following steps manually.

  1. Run the online update to make sure the software management stack is up-to-date. For more information, see Глава 6, YaST Online Update.

  2. Configure the repositories you want to use as an update source. Getting this right is essential. Either use YaST (see Раздел 5.4, «Managing Software Repositories and Services») or zypper (see Раздел 9.1, «Using Zypper»). The name of the repositories as used in the following steps could vary a little bit depending on your customizations.

    To view your current repositories enter:

    zypper lr -u
    
    [Tip]zypper command names

    zypper supports long and short command names. For example, you can abbreviate zypper install as zypper in. In the following text, the short variant is used.

    1. Increase the version number of the system repositories from 11.3 to 11.4; add the new 11.4 repositories with commands such as:

      server=http://download.opensuse.org
      new_ver=11.4
      zypper ar $server/distribution/$new_ver/repo/oss/ openSUSE-$new_ver-Oss
      zypper ar $server/update/$new_ver/ openSUSE-$new_ver-Update
      

      And remove the old repositories:

      old_ver=11.3
      zypper rr openSUSE-$old_ver-Oss
      zypper rr openSUSE-$old_ver-Update
      
    2. Disable third party repositories or other Open Build Service repositories, because zypper dup is guaranteed to work with the default repositories only (replace repo-alias with the name of the repository you want to disable):

      zypper mr -d repo-alias

      Alternatively, you can lower the priority of these repositories.

      [Note]Handling of Unresolved Dependencies

      zypper dup will remove all packages having unresolved dependencies, but it keeps packages of disabled repositories as long as their dependencies are satisfied.

      zypper dup ensures that all installed packages come from one of the available repositories. It does not consider the version, architecture, or vendor of the installed packages; thus it emulates a fresh installation. Packages that are no longer available in the repositories are considered orphaned. Such packages get uninstalled if their dependencies can not be satisfied. If they can be satisfied, such packages stay installed.

    3. Once done, check your repository configuration with:

      zypper lr -d
      
  3. Refresh local metadata and repository contents with zypper ref.

  4. Pull in zypper and the package management stack from the 11.4 repository with zypper up zypper.

  5. Run the actual distribution upgrade with zypper dup. You are asked to confirm the license.

  6. Perform basic system configuration with SuSEconfig.

  7. Reboot the system with shutdown -r now.

16.1.5. Updating Individual Packages

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 Глава 5, 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.

16.2. For More Information

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 Глава 6, YaST Online Update.

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