SuSe server upgrade from SP3 to SP4

Written by Robert -

At work, to be able to get the latest security patches, I had to upgrade a few servers from SuSe 11 SP3 to SP4. This is not a very complicated procedure.

First, you want to update the current system so the latest patches are installed.

zypper ref -s zypper update -t patch zypper update -t patch

After that, we need to make sure the migration tools are available and the right repo's are added:

zypper se -t product | grep -h -- "-migration" | cut -d'|' -f2

After this is done, we can now install the migration tool

zypper in -t product SUSE_SLES-SP4-migration

After installation of the tool, we need to make sure the server is registered. This requires a paid license.

suse_register -d 2 -L /root/.suse_register.log

Now we can refresh the repositories.

zypper ref -s

Just to be sure the SP4 repositories are enabled we enable them again:

zypper modifyrepo --enable SLES11-SP4-Pool zypper modifyrepo --enable SLES11-SP4-Updates

Let's start the upgrade

zypper dup --from SLES11-SP4-Pool --from SLES11-SP4-Updates

After the upgrade, we need to make sure all the latest patches are updated.

zypper update -t patch

Reregister the now SP4 server at SuSe

suse_register -d 2 -L /root/.suse_register.log

Now you can reboot the server, check the log files for errors, make sure the system and the software running on it are fully working and you are done.

You can also do it in a script (and yes, I prefer to use pauses in there)

I don't recommend to do this with a script. This is just to show it's possible. If you have large amount of servers requiring an update, all backups have been checked and working properly and if you are aware of the risks, it's possible to do it this way.

#!/bin/bash
# Update and registering

read -p "Let's start with updating zypper. Press enter"
zypper ref -s
zypper update -t patch
zypper update -t patch
zypper se -t product | grep -h -- "-migration" | cut -d'|' -f2
read -p "Did that return SP4? If so, let's continue. Press enter"

zypper in -t product SUSE_SLES-SP4-migration

read -p "Now it's going to register. Press enter"
suse_register -d 2 -L /root/.suse_register.log

# Upgrade the system to SP4
read -p "Let's refresh zypper and make sure the SP4 pool and update repo's are enabled. Press enter"
zypper ref -s
zypper modifyrepo --enable SLES11-SP4-Pool --enable SLES11-SP4-Updates

read -p "Ready for the upgrade? press enter"
zypper dup --from SLES11-SP4-Pool --from SLES11-SP4-Updates

# Upgrade with the latest patches

read -p "Updates done, let's check for new patches. Press enter"
zypper update -t patch

# Register it again
read -p "And let's register this thing again"
suse_register -d 2 -L /root/.suse_register.log

Comments