Needs-restarting -r Fedora 33

Install new kernel with yum update and and needs-restarting doesn’t report needing to reboot:


Installed:
kernel-5.11.18-200.fc33.x86_64
kernel-core-5.11.18-200.fc33.x86_64
kernel-devel-5.11.18-200.fc33.x86_64
kernel-modules-5.11.18-200.fc33.x86_64
kernel-modules-extra-5.11.18-200.fc33.x86_64
Removed:
kernel-5.11.15-200.fc33.x86_64
kernel-core-5.11.15-200.fc33.x86_64
kernel-devel-5.11.15-200.fc33.x86_64
kernel-modules-5.11.15-200.fc33.x86_64
kernel-modules-extra-5.11.15-200.fc33.x86_64

Complete!

needs-restarting -r

No core libraries or services have been updated since boot-up.
Reboot should not be necessary.

cat /etc/*release

Fedora release 33 (Thirty Three)
NAME=Fedora
VERSION=“33 (Workstation Edition)”
ID=fedora
VERSION_ID=33
VERSION_CODENAME=“”
PLATFORM_ID=“platform:f33”
PRETTY_NAME=“Fedora 33 (Workstation Edition)”
ANSI_COLOR=“0;38;2;60;110;180”
LOGO=fedora-logo-icon
CPE_NAME=“cpe:/o:fedoraproject:fedora:33”
HOME_URL=“https://fedoraproject.org/
DOCUMENTATION_URL=“System Administrator’s Guide :: Fedora Docs
SUPPORT_URL=“Communication in Fedora :: Fedora Docs
BUG_REPORT_URL=“https://bugzilla.redhat.com/
REDHAT_BUGZILLA_PRODUCT=“Fedora”
REDHAT_BUGZILLA_PRODUCT_VERSION=33
REDHAT_SUPPORT_PRODUCT=“Fedora”
REDHAT_SUPPORT_PRODUCT_VERSION=33
PRIVACY_POLICY_URL=“Privacy Statement for the Fedora Project :: Fedora Docs
VARIANT=“Workstation Edition”
VARIANT_ID=workstation
Fedora release 33 (Thirty Three)
Fedora release 33 (Thirty Three)

2 Likes

According to its manpage, it looks through running processes and tries to detect those that use files from packages that have been updated after the given process started. I guess kernel is not included to “running processes”.

2 Likes

Which is OK, since the current kernel is not replaced. If one wants to use the new kernel, they need to reboot, but they can continue to use the current kernel without restarting and not experience any issues.

See also:

https://dnf-plugins-extras.readthedocs.io/en/latest/tracer.html

sudo dnf install python3-dnf-plugin-tracer
4 Likes

Fedora 32 would state that a reboot was necessary after a kernel update. That’s why I mentioned it.

1 Like

From what I remember, dnf check-update prints a warning about that if kernel is updated but old kernel is running. I don’t remember needs-restarting command displays anything related to kernel.

2 Likes