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 3, Installing or Removing Software and Chapter 4, YaST Online Update. Two ways to upgrade the system are discussed in the following sections— see Section 14.1.3, “Upgrading with YaST” and Section 14.1.4, “Distribution Upgrade with zypper”.
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.
Before upgrading, copy the old configuration files to a separate medium
(such as tape device, 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 14.1, “List with df -h”, the root partition
to write down is /dev/sda3 (mounted as
/).
Example 14.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
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. Here, we point out more issues to check before starting the system upgrade.
Following the preparation procedure outlined in Section 14.1.1, “Preparations”, you can now upgrade your system:
Boot the system as for the installation, described in Section “System Start-Up for Installation” (Chapter 1, Installation with YaST, ↑Start-Up). In YaST, choose a language and select in the dialog. Do not select . Also add repositories to make sure to get all available software updated whenever possible. Find more information about installation repositories in Section “Add-On Products” (Chapter 1, Installation with YaST, ↑Start-Up).
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
(/dev/sda3 was selected in the example in
Section 14.1.1, “Preparations”). YaST reads the old
fstab on this partition to analyze and mount the
file systems listed there.
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 for every list item, if appropriate.
If you added repositories during the upgrade procedure as recommended above, you now can activate those you are actually interested in.
In the 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 offered in the 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.
Confirm the upgrade by clicking .
Once the basic upgrade installation is finished, test the Internet connection as offered by the YaST dialog. Finally, YaST updates the remaining software and displays the release notes. Click to write the YaST configuration.
With the zypper command line utility you can upgrade to the next version of your distribution. Most importantly, you can initiate the system upgrade process from within the running system.
This 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.
To avoid unexpected errors during the upgrade process using zypper, minimize risky constellations.
Upgrade from the previous version (e.g., 11.1) to this version (11.2)—do not skip any minor version inbetween (this means, do not upgrade from 11.0 or earlier to 11.2 in one go). Make sure all available 11.1 online updates are successfully applied.
Close as many applications and unneeded services as possible and log out all regular users.
Disable third party or openSUSE 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 running system.
For more information, see http://en.opensuse.org/Upgrade/11.2#Command_line.
![]() | Check Your System Backup |
|---|---|
Before acutally starting the 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. | |
Run the online update to make sure the software management stack is up-to-date. For more information, see Chapter 4, YaST Online Update.
Configure the repositories you want to use as an update source. To get this right is essential. Either use YaST (see Section 3.4, “Managing Software Repositories and Services”) or zypper (see Section 7.1, “Using Zypper”).
To view your current repositories enter:
zypper lr -u
Increase the version number of the system repositories from 11.1 to 11.2; add the new 11.2 repositories with commands such as:
server=http://download.opensuse.org zypper ar $server/distribution/11.2/repo/oss/ openSUSE-11.2-Oss zypper ar $server/update/11.2/ openSUSE-11.2-Update
And remove the old repositories:
zypper rr openSUSE-11.1-Oss zypper rr openSUSE-11.1-Update
Disable third party repositories or other openSUSE Build Service repositories, because zypper dup is in test and guaranteed to work only with the default repositories:
zypper mr -d repo-alias
Conversely, you can lower the priority of these repositories.
![]() | 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.
Once done, check your repository configuration with:
zypper lr -d
Refresh local metadata and repository contents with zypper ref.
Pull in zypper from the 11.2 repository with zypper in zypper.
Run the actual distribution upgrade with zypper dup. You are asked to confirm the license.
Perform basic system configuration with SuSEconfig.
Reboot the system with shutdown -r now.
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. Update advice can be found at http://www.novell.com/linux/download/updates/.
Select components from the YaST package selection list according to your needs. 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.