Remote Upgrade to SLES 11 SP1 Using Zypper

As you might have noted in my previous posts, I do not like to visit server consoles for upgrades.  So I want to thank Novell for having outlined a handy little instruction sheet here:  How to upgrade to SLES/SLED 11 SP1 (TID 7005410) on how to do various remote upgrades from SLES 11 to SLES 11 sp1, including remotely via shell session.  I’ve used these steps outlined in the section called “Update to SP1 via patches” –> “2) Update by using zypper” with great success so far.  However, I’d like to toss one or two little tips back to the community…

In these steps outlined by Novell, you are required to manually retrieve the values from /etc/products.d/*.prod and individually install the special upgrade/migration packages for each listed product definition.  And that’s fine in a lab, but with a farm of servers and potentially more than one upgrade/migration type each (in my situation they were cluster/HA servers, so each had two items), this can be a bit of a bother.  So for added convenience, I wrote a little “for” loop tweak to take care of those manual steps.

Without further ado, here are the modified steps for the upgrade to SLES11 sp1 using zypper with my tweak (thanks again Novell, and please see the caveats below):

zypper ref -s
zypper up -t patch
zypper up -t patch
for item in `cat /etc/products.d/*.prod|grep '<product>'|sed s/\<*.product\>//g |sed s/" "//g`; do zypper in -t product $item;done
suse_register -d 2 -L /root/.suse_register.log
zypper ref -s
zypper lr
zypper dup

…and there are a few very important points to be made about the above steps:

  • Do not run those steps as a continuous script;  step through it line-by-line, watching the results at each step.
  • Make sure your registration keys are all up to date and your repositories are in good shape before starting!  This is especially important and complex if you are using the HA extension or other custom add-on products that require registrations and repositories.
  • In my experience, I sometimes needed to re-check and repair my repositories after the first or second “patch” statement, and sometimes before the “dup” statement; I do not know why.  Even Novell’s doc suggests that there may be complications.
  • Afterward, you might want to go in and run the yast customer center registration tool, and allow it to clean itself up.

I hope that helps!

🙂

5 Comments

  1. happylinuxguy

    Thank you. This worked great. It also worked to upgrade SLED 11 to SLED 11 sp1.

  2. Jensen

    That was indeed cool. Thanks a lot!!!

  3. Niyati

    Thanks , this is useful info..

    just a query is it required to register the system in yast2 > Novell customer center Configuration?
    As such the server is a registered version of sles 11 and I am going to upgrade it to sp1. But I am not sure it is actully registered with NCC or not. How to verify that? Because in yast2 > NCC > it is asking for option ‘Configure Now’.
    In zypper is there any command to find out the sles registration is done or not.

    Thanks again

  4. Jeremy Pavlov

    @ Niyati

    As far as I know, it always asks for “Configure Now”…. At least as I remember it…

    Anyway, here are a couple things to check:
    zypper sl (to show the URI for the updates)
    yast -> Software -> Sources (to see if they are valid, since they will likely auto-refresh)

    …If the sources are invalid, they will fail to refresh while using yast to check them, and it will prompt you to remove them. If the refresh goes ahead without problems and you see all the sources in your list, then everything should be fine.

    I hope that helps…
    🙂

  5. Matteo Bisi

    Thanks Jeremy, your help was really appreciated and i’ve upgrade following your guide!

Leave a Comment

Your email address will not be published. Required fields are marked *