3 Preparing the upgrade #
Before starting the upgrade procedure, make sure your system is properly prepared. Among other things, preparation involves backing up data and checking the release notes. The following chapter guides you through these steps.
3.1 Make sure the current system is up-to-date #
Upgrading the system is only supported from the most recent patch level. Make sure the latest system updates are installed by running:
#
transactional-update patch
3.2 Read the release notes #
Find a list of all changes, new features, and known issues in the
release notes.
You can also find the release notes on the installation media in the
docu
directory.
The release notes usually only contain the changes between two subsequent releases.
Check the release notes to see whether:
your hardware needs special considerations;
any used software packages have changed significantly;
special precautions are necessary for your installation.
3.3 Make a backup #
Before upgrading, back up your data by copying the existing configuration
files to a separate medium (such as tape device, removable hard disk, etc.).
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 all data as root
. Only root
has sufficient permissions
for all local files.
3.4 Listing installed packages and repositories #
You can save a list of installed packages, for example when doing a fresh install of a new major SLE release or reverting to the old version.
Be aware that not all installed packages or used repositories are available in newer releases of SUSE Linux Enterprise. Some may have been renamed and others replaced. It is also possible that some packages are still available for legacy purposes while another package is used by default. Therefore some manual editing of the files might be necessary. This can be done with any text editor.
Create a file named
repositories.bak.repo
containing a list of all used repositories:#
zypper
lr -e repositories.bakAlso create a file named
installed-software.bak
containing a list of all installed packages:#
rpm
-qa --queryformat '%{NAME}\n' > installed-software.bakBack up both files. The repositories and installed packages can be restored with the following commands:
#
zypper
ar repositories.bak.repo#
transactional-update pkg install
$(cat installed-software.bak)Note: Number of packages increases with an update to a new releaseA system upgraded to a new (minor or major) version may contain more packages than the initial system. It could also contain more packages than a fresh installation of the new SLE Micro with the same pattern selection. Reasons for this are:
Packages were split to allow a more fine-grained package selection.
When a package has been split, all new packages are installed in the upgrade case to retain the same functionality as with the previous version. However, the new default for a fresh installation of SLE Micro new versions may be to not install all packages.
Legacy packages from the initial SLE Micro may be kept for compatibility reasons.
Package dependencies and the scope of patterns may have changed.
3.5 Disable the LTSS extension #
If you upgrade a SUSE Linux Enterprise Micro system with Long Term Service Pack Support
(LTSS) to a version that is still under general support, the upgrade will
fail with the error No migration available
. This happens
because zypper migration
tries to migrate
all repositories , but there is no LTSS repository for
the new version yet.
To fix this issue, disable the LTSS extension before the upgrade.
Check if the LTSS extension is enabled:
>
sudo
SUSEConnect --list-extensions | grep LTSS SUSE Linux Enterprise Server LTSS 12 SP4 x86_64 (Installed) Deactivate with: SUSEConnect -d -p SLES-LTSS/12.4/x86_64Disable the LTSS extension with the command from the
SUSEConnect
output above:>
sudo
SUSEConnect -d -p SLES-LTSS/12.4/x86_64 Deregistered SUSE Linux Enterprise Server LTSS 12 SP4 x86_64 To server: https://scc.suse.com/Verify the LTSS repository is no longer present with
zypper lr
.
3.6 Shut down virtual machine guests #
If your machine serves as a VM Host Server for KVM, 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.
3.7 Disk space #
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, back up 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.
3.7.1 Checking disk space on Btrfs root file systems #
On a Btrfs file system, the output of df
can be
misleading, because in addition to the space the raw data allocates, a
Btrfs file system also allocates and uses space for metadata.
Consequently a Btrfs file system may report being out of space even though it seems that plenty of space is still available. In that case, all space allocated for the metadata is used up. For more information refer to https://btrfs.wiki.kernel.org/index.php/FAQ.
Make sure there is enough free space as the root file system uses Btrfs and
might consume significant amount of space. Check the available space on all
mounted partitions. In the worst case, an upgrade needs as much disk space
as the current root file system (without /.snapshot
)
for a new snapshot.
The following recommendations have 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 is only freed after new RPMs are installed.
For Btrfs with snapshots, you need as a minimum as much free space as your current installation takes. We recommend having 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
:#
snapper
list#
snapper
delete NUMBERHowever, this may not help in all cases. Before migration, most snapshots occupy only little space.
3.8 Adjust the resume
boot parameter #
On systems that have been installed with SUSE Linux Enterprise Micro 12 or older, the default kernel command
line in /etc/default/grub
may contain a resume
parameter using a device node name such as /dev/sda1
to refer to the
hibernation ('suspend-to-disk') device. As device node names are not persistent and may
change between reboots, it is strongly recommended to fix this, otherwise the upgraded system
may hang on reboot.
Find the hibernation device:
>
sudo
grep resume /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/sda1 splash=silent quiet showopts"The hibernation device is
/dev/sda1
. If the command returns nothing, hibernation is not configured.Get the UUID for
/dev/sda1
:>
sudo
blkid /dev/vda1
/dev/vda1: UUID="a1d1f2e0-b0ee-4be2-83d5-78a98c585827" TYPE="swap" PARTUUID="000134b5-01"The UUID for
/dev/sda1
isa1d1f2e0-b0ee-4be2-83d5-78a98c585827
.Edit
/etc/default/grub
and adjust the resume parameter. Replace/dev/sda1
withUUID=a1d1f2e0-b0ee-4be2-83d5-78a98c585827
. The result will look like this:GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=a1d1f2e0-b0ee-4be2-83d5-78a98c585827 splash=silent quiet showopts"
Update the configuration of the grub boot manger:
>
sudo
grub2-mkconfig -o /boot/grub2/grub.cfg
If the system does not use hibernation, you can simply remove the resume parameter and update the boot configuration.