SUSE® Linux Enterprise (SLE) allows to update an existing system to the new version, for example, going from SLE 11 SP4 to SLE 12. No new installation is needed. Existing data, such as home and data directories and system configuration, is kept intact. You can update from a local CD or DVD drive or from a central network installation source.
This chapter explains how to manually upgrade your SUSE Linux Enterprise system, be it by DVD, network, an automated process, or SUSE Manager.
Before starting the update procedure, make sure your system is properly prepared. Among others, preparation involves backing up data and checking the release notes.
SUSE Linux Enterprise Desktop allows to install multiple Kernel versions by enabling the
respective settings in /etc/zypp/zypp.conf. Support
for this feature needs to be temporarily disabled for updating to a service
pack. When the update has successfully finished; multiversion support can be
re-enabled again. To disable multiversion support, comment the respective
lines in /etc/zypp/zypp.conf. The result should look
like this:
#multiversion = provides:multiversion(kernel) #multiversion.kernels = latest,running
To re-activate this feature after a successful update, remove the comment signs. For more information about multiversion support, refer to Section 10.1, “Enabling and Configuring Multiversion Support”.
In the release notes you can find additional information on what has changed since the previous release of SUSE Linux Enterprise. Verify there if your specific hardware or setup needs special considerations, which of your favorite specific software packages have changed significantly, and which precautions you should take in addition to the general recommendations of this section. The release notes also provide last-minute information and known issues that could not make it to the manual on time.
The current version of the release notes document containing the latest information on SUSE Linux Enterprise Desktop can be read online at http://www.suse.com/documentation/.
Before updating, copy existing configuration files to a separate medium
(such as tape device, removable hard disk, etc.) to back up the data. This
primarily applies to files stored in /etc and some
directories and files in /var and
/opt. 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
permissions for all local files.
If you have selected as the
installation mode in YaST, you can choose to do a (system) backup at a
later point in time. You can choose to include all modified files and files
from the /etc/sysconfig directory. However, this is
not a complete backup, as all the other important directories mentioned
above are missing. Find the backup in the
/var/adm/backup directory.
As of SUSE Linux Enterprise 12, SUSE switched from MySQL to MariaDB. Before you start any upgrade, it is highly recommended to back up your database.
To perform the database migration, do the following:
Log in to your SUSE Linux Enterprise 11 machine.
Create a dump file:
root #mysqldump-u root -p --all-databases > mysql_backup.sql
By default, mysqldump does not dump the
INFORMATION_SCHEMA or
performance_schema database. For more details refer to
https://dev.mysql.com/doc/refman/5.5/en/mysqldump.html.
Store your dump file, the configuration file
/etc/my.cnf, and the directory
/etc/mysql/ for later investigation
(NOT installation!) in a safe place.
Perform your upgrade. After the upgrade, your former configuration file
/etc/my.cnf is still intact. You can find the new
configuration in the file /etc/my.cnf.rpmnew.
Configure your MariaDB database to your needs. Do NOT use the former configuration file and directory, but use it as a reminder and adapt it.
Make sure you start the MariaDB server:
root #systemctlstart mysql
If you want to start the MariaDB server on every boot, enable the service:
root #systemctlenable mysql
Verify that MariaDB is running properly by connecting to the database:
root #mysql-u root -p
SLE11 SP3 and SLE12 GA get a newer version of the PostgreSQL database as a maintenance update. Because of the required migration work of the database, there is no automatic upgrade process. As such, the switch from one version to another needs to be done manually.
The migration process is conducted by the pg_upgrade
command which is an alternative method of the classic dump and reload. In
comparison with the “dump & reload” method,
pg_upgrade makes the migration less time-consuming.
Each PostgreSQL version stores its files in different, version-dependent directories. After the update the directories will change to:
/usr/lib/postgresql91/ to
/usr/lib/postgresql94/
/usr/lib/postgresql93/ to
/usr/lib/postgresql94/
To perform the database migration, do the following:
Make sure the following preconditions are fulfilled:
If not already done, upgrade any package of the old PostgreSQL version to the latest release through a maintenance update.
Create a backup of your existing database.
Install the packages of the new PostgreSQL major version. For SLE12 this means to install postgresql94-server and all the packages it depends on.
Install the package
postgresql94-contrib
which contains the command pg_upgrade.
Make sure you have enough free space in your PostgreSQL data area,
which is /var/lib/pgsql/data by default. If space
is tight, try to reduce size with the following SQL command on each
database (can take very long!):
VACUUM FULL
Stop the PostgreSQL server:
root #/usr/sbin/rcpostgresqlstop
Rename your old data directory:
root #mv/var/lib/pgsql/data /var/lib/pgsql/data.old
Create a new data directory:
root #mkdir-p /var/lib/pgsql/data
If you have changed your configuration files in the old version, copy the
files postgresql.conf
pg_hba.conf to your new data
directory:
root #cp/var/lib/pgsql/data.old/*.conf \ /var/lib/pgsql/data
Initialize your new database instance either manually with
initdb or by starting and stopping PostgreSQL, which
will do it automatically:
root #/usr/sbin/rcpostgresqlstartroot #/usr/sbin/rcpostgresqlstop
Start the migration process and replace the OLD placeholder with the older version:
root #pg_upgrade\ --old-datadir "/var/lib/pgsql/data.old" \ --new-datadir "/var/lib/pgsql/data" \ --old-bindir "/usr/lib/postgresqlOLD/bin/" \ --new-bindir "/usr/lib/postgresql94/bin/"
Start your new database instance:
root #/usr/sbin/rcpostgresqlstart
Check if the migration was successful. There is no general tool to automate this step. It depends on your use case how much and what you want to test.
Remove any old PostgreSQL packages and your old data directory:
root #zyppersearch -s postgresqlOLD | xargs zypper rm -uroot #rm-rf /var/lib/pgsql/data.old
During the update from SP1 to SP2, MD5-based certificates were disabled as part of a security fix. If you have certificates created as MD5, recreate your certificates with the following steps:
Open a terminal and log in as root.
Create a private key:
root #opensslgenrsa -out server.key 1024
If you want a stronger key, exchange 1024 with a
higher number, for example, 4096.
Create a certificate signing request (CSR):
root #opensslreq -new -key server.key -out server.csr
Self-sign the certificate:
root #opensslx509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Create the PEM file:
root #catserver.key server.crt > server.pem
Place the files server.crt,
server.csr, server.key, and
server.pem in the respective directories where
the keys can be found. For Tomcat, for example, this directory is
/etc/tomcat/ssl/.
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.
clientSetup4SMT.sh script on SMT clients #
If you are migrating your client OS that is registered against an SMT server, you need to check if the version
of the clientSetup4SMT.sh script on your host is up to date.
clientSetup4SMT.sh from older versions of SMT cannot manage SMT 12 clients.
If you apply software patches regularly on your SMT server, you can always find the latest version
of clientSetup4SMT.sh at <SMT_HOSTNAME>/repo/tools/clientSetup4SMT.sh.
Software tends to “grow” from version to version. Therefore, take a look at the available partition space before updating. If you suspect you are running short of disk space, secure your data before increasing the available space by resizing partitions, for example. There is no general rule regarding how much space each partition should have. Space requirements depend on your particular partitioning profile and the software selected.
During the update procedure, YaST will check the free disk space and display a warning to the user if the installation may exceed the available amount. In that case, performing the update may lead to an unusable system! Only if you know exactly what you are doing (by testing beforehand), you can skip the warning and continue the update.
Use the df command to list available disk space. For
example, in Example 14.1, “List with df -h”, the root partition is
/dev/sda3 (mounted as /).
df -h #Filesystem Size Used Avail Use% Mounted on /dev/sda3 74G 22G 53G 29% / tmpfs 506M 0 506M 0% /dev/shm /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 use Btrfs as root file systems on your machine, make sure there is enough free space. Getting disk space can be done with these two commands:
root #btrfsfilesystem df /root #df/
The results of the two commands show similar numbers of how much disk space is used. However, the problem with Btrfs and free space is that you do not know what is referenced in a snapshot and what is not; you cannot calculate how much disk space a change would need.
In the worst case, an upgrade needs as much disk space as the current root
file system (without /.snapshot). Besides any Btrfs
file systems, check for free space on other file systems as well. The
following recommendation has been proven:
For all file systems including Btrfs you need enough free disk space to download and install big RPMs. The space of old RPMs are only freed after new RPMs are installed.
For Btrfs with snapshots, you need at minimum as much free space as your current installation takes. It is recommended to have twice as much free space as the current installation.
If you do not have enough free space, you can try to delete old snapshots
with snapper like this:
root #snapperlistroot #snapperdelete NUMBER
However, this may not help in all cases. Before migration, most snapshots occupy only little space.
Cross-architecture upgrades, such as upgrading from a 32-bit version of SUSE Linux Enterprise Desktop to the 64-bit version, or upgrading from big endian to little endian are not supported!
Specifically, SLE 11 on POWER (big endian) to SLE 12 SP1 on POWER (new: little endian!), is not supported.
Also, since SUSE Linux Enterprise 12 is 64-bit only, upgrades from any 32-bit SUSE Linux Enterprise 11 systems to SUSE Linux Enterprise 12 and later are not supported.
Before you perform any migration, read Section 14.1, “General Preparations”.
There is no supported direct migration path to SUSE Linux Enterprise 12. A fresh installation is recommended instead.
There is no supported direct migration path to SUSE Linux Enterprise 12. You need at least SLE 11 SP3 before you can proceed to SLE 12.
If you cannot do a fresh install, you need to first update from SLE 11 GA to SP1, then from SLE 11 SP1 to SP2, and then from SLE 11 SP2 to SP3. These steps are described in the SUSE Linux Enterprise 11 Deployment Guide.
Then proceed with Section 14.4, “Supported Methods for Upgrading SUSE Linux Enterprise”.
Refer to Section 14.4, “Supported Methods for Upgrading SUSE Linux Enterprise” for details.
Refer to Chapter 15, Service Pack Migration for details.
Upgrading from SUSE Linux Enterprise 11 SP3 to SUSE Linux Enterprise 12, SUSE Linux Enterprise 11 SP3 to SUSE Linux Enterprise 12 SP1, or SUSE Linux Enterprise 11 SP4 to SUSE Linux Enterprise 12 SP1 is supported using one of the following methods:
Before you upgrade your system, read Section 14.1, “General Preparations” first.
To upgrade your system this way, you need to boot from an installation source, like you would do for a fresh installation. However, when the boot screen appears, you need to select (instead of ). The installation source to boot from can be one of the following:
A local installation medium (like a DVD, or an ISO image on a USB mass storage device). For detailed instructions, see Section 14.5.1, “Upgrading from an Installation Medium”.
A network installation source. You can either boot from the local medium and then select the respective network installation type, or boot via PXE. For detailed instructions, see Section 14.5.2, “Upgrading from a Network Installation Source”.
The procedure below describes booting from a DVD as an example, but you can also use another local installation medium like an ISO image on a USB mass storage device. The way to select the boot method and to start up the system from the medium depends on the system architecture and on whether the machine has a traditional BIOS or UEFI. For details, see the links below.
Insert DVD 1 of the SUSE Linux Enterprise 12 SP1 installation medium and boot your machine. A screen is displayed, followed by the boot screen.
Select the respective boot method to start the system from the medium (see Section 2.1, “Choosing the Installation Method”).
Start up the system from the medium (see Section 2.2, “System Start-up for Installation”).
Proceed with the upgrade process as described in Section 14.7, “Starting the Upgrade Process After Booting”.
If you want to start an upgrade from a network installation source, make sure that the following requirements are met:
A network installation source is set up according to Chapter 3, Setting Up the Server Holding the Installation Sources.
Both the installation server and the target machine have a functioning network connection. The network must provide the following services: a name service, DHCP (optional, but needed for booting via PXE), and OpenSLP (optional).
You have a SUSE Linux Enterprise DVD 1 (or a local ISO image) at hand to boot the target system or a target system that is set up for booting via PXE according to Section 4.5, “Preparing the Target System for PXE Boot”. Refer to Chapter 5, Remote Installation for in-depth information on starting the upgrade from a remote server.
When upgrading from network installation source, you can either boot from the local medium and then select the respective network installation type, or boot via PXE. Select the method of your choice and proceed as described in Procedure 14.2 or Procedure 14.3.
This procedure describes booting from a DVD as an example, but you can also use another local installation medium like an ISO image on a USB mass storage device. The way to select the boot method and to start up the system from the medium depends on the system architecture and on whether the machine has a traditional BIOS or UEFI. For details, see the links below.
Insert DVD 1 of the SUSE Linux Enterprise 12 SP1 installation media and boot your machine. A screen is displayed, followed by the boot screen.
Select the type of network installation source you want to use (FTP, HTTP, NFS, SMB, or SLP). Usually you get this choice by pressing F4, but in case your machine is equipped with UEFI instead of a traditional BIOS, you may need to manually adjust boot parameters. For details, see Installing from a Network Server in Chapter 2, Installation with YaST.
Proceed with the upgrade process as described in Section 14.7, “Starting the Upgrade Process After Booting”.
To perform an upgrade from a network installation source using PXE Boot, proceed as follows:
Adjust the setup of your DHCP server to provide the address information needed for booting via PXE. For details, see Section 4.5, “Preparing the Target System for PXE Boot”.
Set up a TFTP server to hold the boot image needed for booting via PXE. Use DVD 1 of your SUSE Linux Enterprise 12 SP1 installation media for this or follow the instructions in Section 4.2, “Setting Up a TFTP Server”.
Prepare PXE Boot and Wake-on-LAN on the target machine.
Initiate the boot of the target system and use VNC to remotely connect to the installation routine running on this machine. For more information, see Section 5.3.1, “VNC Installation”.
Proceed with the upgrade process as described in Section 14.7, “Starting the Upgrade Process After Booting”.
Before you upgrade your system, read Section 14.1, “General Preparations” first. To perform an automated migration, proceed as follows:
Copy the installation Kernel linux and the file
initrd from /boot/x86_64/loader/
from your first installation DVD to your system's
/boot directory:
cp-vi DVDROOT/boot/x86_64/loader/linux /boot/linux.upgradecp-vi DVDROOT/boot/x86_64/loader/initrd /boot/initrd.upgrade
DVDROOT denotes the path where your system
mounts the DVD, usually /run/media/$USER/$DVDNAME.
Open the GRUB legacy configuration file
/boot/grub/menu.lst and add another section. For
other boot loaders, edit the respective configuration file(s). Adjust
device names and the root parameter accordingly.
For example:
title Linux Upgrade Kernel kernel (hd0,0)/boot/linux.upgrade root=/dev/sda1 upgrade=1 OPTIONAL_PARAMETERS initrd (hd0,0)/boot/initrd.upgrade
OPTIONAL_PARAMETERS denote additional boot parameters which you might need to boot your system and perform the upgrade. These may be kernel parameters needed for your system—check if you need to review and copy those from an existing GRUB entry. They also may be SUSE linuxrc parameters, documented online.
If the upgrade should be done automated, add the
autoupgrade=1 to the end of the kernel
line in your GRUB configuration.
Reboot your machine and select the newly added section from the boot menu
(here: Linux Upgrade Kernel). You can use
grubonce to preselect the newly created GRUB entry for
an unattended automatic reboot into the newly created entry. You can also
use reboot to initiate the reboot from the command
line.
Proceed with the usual upgrade process as described in Section 14.7, “Starting the Upgrade Process After Booting”.
After the upgrade process was finished successfully, remove the
installation Kernel and initrd files
(/boot/linux.upgrade and
/boot/initrd.upgrade). They are not needed anymore.
After you have booted (either from an installation medium or the network), select the entry on the boot screen.
If you select instead of , data may be lost later. You need to be extra careful to not destroy your data partitions by doing a fresh installation, for example by repartitioning the disks (which can destroy the existing partitions) or by reformatting the data partitions (which erases all data on them).
Make sure to select here.
YaST starts the installation system.
On the screen choose and and accept the license agreement. Proceed with .
YaST checks your partitions for already installed SUSE Linux Enterprise systems.
On the screen, select the partition to upgrade and click .
YaST mounts the selected partition and displays all repositories that have been found on the partition that you want to upgrade.
On the screen, adjust the status of the repositories: enable those you want to include in the upgrade process and disable any repositories that are no longer needed. Proceed with .
On the screen, select whether to register the upgraded system now (by entering your registration data and clicking ) or if to . For details on registering your system, see Section 14.10, “Registering Your System”.
Review the for the upgrade, especially the . Choose between the following options:
, in which case you might miss new features shipped with the latest SUSE Linux Enterprise version.
. Click if you want to enable or disable patterns and packages according to your wishes.
If you used KDE before upgrading to SUSE Linux Enterprise 12
(DEFAULT_WM in
/etc/sysconfig/windowmanager was set to
kde*), your desktop environment will automatically be
replaced with GNOME after the upgrade. By default, the KDM display
manager will be replaced with GDM.
To change the choice of desktop environment or window manager, adjust the software selection by clicking .
If all settings are according to your wishes, start the installation and removal procedure by clicking .
After the upgrade process was finished successfully, check for any “orphaned packages”. Orphaned packages are packages which belong to no active repository anymore. The following command gives you a list of these:
zypper packages --orphaned
With this list, you can decide if a package is still needed or can be uninstalled safely.
SUSE Manager is a server solution for providing updates, patches, and security fixes for SUSE Linux Enterprise clients. It comes with a set of tools and a Web-based user interface for management tasks. See https://www.suse.com/products/suse-manager/ for details.
When performing a service pack migration, it is necessary to change the configuration on the registration server to provide access to the new repositories. If the migration process is interrupted or reverted (via restoring from a backup or snapshot), the information on the registration server is inconsistent with the status of the system. This may lead to you being prevented from accessing update repositories or to wrong repositories being used on the client.
When a rollback is done via Snapper, the system will notify the registration server to ensure access to the correct repositories is set up during the boot process. If the system was restored any other way or the communication with the registration server failed for any reason (for example, because the server was not accessible because of network issues), trigger the rollback on the client manually by calling:
snapper rollbackWe suggest always checking that the correct repositories are set up on the system, especially after refreshing the service using
zypper ref -sThis functionality is available in the rollback-helper package.
If you skipped the registration step during the installation, you can register your system at any time using the module in YaST.
Registering your systems has these advantages:
Getting support
Getting security updates and bug fixes
Access to SUSE Customer Center
Start YaST and select › to open the dialog.
Provide the address associated with the SUSE account you or your organization uses to manage subscriptions. In case you do not have a SUSE account yet, go to the SUSE Customer Center home page (https://scc.suse.com/) to create one.
Enter the you received with your copy of SUSE Linux Enterprise Desktop.
Proceed with to start the registration process. If one or more local registration servers are available on your network, you can choose one of them from a list. Alternatively, choose to ignore the local registration servers and register with the default SUSE registration server.
During the registration, the online update repositories will be added to your upgrade setup. When finished, you can choose whether to install the latest available package versions from the update repositories. This provides a clean upgrade path for all packages and ensures that SUSE Linux Enterprise Desktop is upgraded with the latest security updates available. If you choose , all packages will be installed from the installation media. Proceed with .
After successful registration, YaST lists extensions, add-ons, and modules that are available for your system. To select and install them, proceed with Section 9.1, “Installing Modules and Extensions from Online Channels”.
When installing a new kernel with YaST or Zypper, SUSE Linux Enterprise preserves the last two kernels and the running one. Usually this is sufficient.
However, there may be situations where you need to preserve more kernel versions, for example, for testing purposes. To enable this, SUSE Linux Enterprise supports the multiversion kernel feature. By enabling and configuring this feature the default behavior can be changed and configured to:
delete an old kernel only after the system has been rebooted successfully with the new kernel
keep a specified number of older kernels as fallback
keep a specific kernel version
After the successful reboot, a script will compare the list of installed
kernels with the settings in /etc/zypp/zypp.conf and
delete those kernels that are no longer needed.
The default behavior is defined in the configuration file
/etc/zypp/zypp.conf:
root #grep^multiversion /etc/zypp/zypp.conf multiversion = provides:multiversion(kernel) multiversion.kernels = latest,latest-1,running
Remove any hash mark (#) before the line multiversion
above to enable this feature (which should already be the case). The second
line is used to configure which kernels need to be
preserved. You need to enable both, otherwise the system will keep
all kernels and it will fill up your hard disk.
The multiversion.kernels line can contain several
keywords in different combinations and order:
latest
Keep kernel with the highest version number
latest-N
Keep kernel with the Nth highest version number; N is a number starting from 1
running
Keep the current running kernel
oldest
Keep kernel with the lowest version number (the kernel on the released product)
oldest-N
Keep kernel with the Nth lowest version number
3.12.28-4.6
Keep this exact kernel version
You want to make sure that an old kernel will only be deleted after the system has rebooted successfully of the new kernel.
Change the following line in /etc/zypp/zypp.conf:
multiversion.kernels = latest,running
The previous parameters tell the system to keep the latest kernel and the running one only if they differ.
You want to keep one or more kernel versions to have one or more “spare” kernels.
This use case can be useful if you need kernels for testing reasons. In case something goes wrong, for example, your machine does not boot, you still can use one or more kernel versions which are known to be good.
Change the following line in /etc/zypp/zypp.conf:
multiversion.kernels = latest,latest-1,latest-2,running
When you reboot your system after the installation of a new kernel, the
system will keep three kernels: the new and running kernel (configured as
latest,running), the previous kernel version of the new
kernel (configured as latest-1), and the predecessor of
the previous kernel version (configured as latest-2).
You make regular system updates and install new kernel versions. However, you are also compiling your own kernel version for various reasons and want to make sure that the system will keep it.
Change the following line in /etc/zypp/zypp.conf:
multiversion.kernels = latest,3.12.28-4.20,running
When you reboot your system after the installation of a new kernel, the
system will keep two kernels: the new and running kernel (configured as
latest,running) and your self-compiled kernel
(configured as 3.12.28-4.20).