SUSE Support

Here When You Need Us

How to check if system reboot is needed after patching

This document (000021330) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 SP5
SUSE Linux Enterprise Server 15 SP5

Situation

After performing patch activity, you want to check if system reboot is needed or not. 

Resolution

zypper command have needs-rebooting subcommand which can be used to check if system reboot is required or not. zypper should always tell the correct answer. 
 
s15sp5:~ # zypper needs-rebooting
No core libraries or services have been updated since the last system boot.
Reboot is probably not necessary.

After upgrading/patching core system component:
 
s12sp5:~ # zypper needs-rebooting
Since the last system boot core libraries or services have been updated.
Reboot is suggested to ensure that your system benefits from these updates.

Note: This option is available in SLE 12 SP5 with zypper version 1.13.65-21.58.2.

Cause

It is important to mention that: 
  • On SLE12 only patch's metadata contains the reboot flag.
  • On SLE15 - in addition to patches - also packages may indicate the need to reboot by providing `installhint(reboot-needed)'. 
What above means, is when trying to update a package that needs system reboot, on SLE 12 SP5 zypper will not print anything like system needs reboot: 
s12sp5:~ # zypper up kernel-default
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  kernel-default-4.12.14-122.189.1

1 new package to install.
Overall download size: 55.2 MiB. Already cached: 0 B. After the operation, additional 252.0 MiB will be used.

But when installing a patch, zypper will report if system reboot is needed: 
s12sp5:~ # zypper in patch:SUSE-SLE-SERVER-12-SP5-2019-3200
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  kernel-default-4.12.14-122.189.1

The following NEW patch is going to be installed:
  SUSE-SLE-SERVER-12-SP5-2019-3200

The following patch requires a system reboot:
  SUSE-SLE-SERVER-12-SP5-2019-3200

1 new package to install.
Overall download size: 55.2 MiB. Already cached: 0 B. After the operation, additional 252.0 MiB will be used.

    Note: System reboot required.

On SLE 15 SP5, zypper report if system needs reboot even when updating kernel: 
s15sp5:~ # zypper up kernel-default
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  kernel-default-5.14.21-150500.55.44.1

The following package requires a system reboot:
  kernel-default-5.14.21-150500.55.44.1

1 new package to install.
Overall download size: 108.6 MiB. Already cached: 0 B. After the operation, additional 177.0 MiB will be used.

    Note: System reboot required.

Additional Information

SLE 15 SP5 also includes needs-restarting coming from zypper-needs-restarting, which does the same task.

What updates require a reboot ?

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021330
  • Creation Date: 22-Jan-2024
  • Modified Date:22-Jan-2024
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.