Linux system restart required

What Does *** System restart required *** in Ubuntu | Debian Mean?

The reason you see the *** System restart required *** notice when you sign into Ubuntu/Debian is that you need to reboot your system.

You must reboot your Linux box when you install a new kernel or update critical libraries such as libc. This happens in both Ubuntu and Debian Linux systems where they take the initiative to tell you if the system needs a reboot when you log in to your box as a root or sudoer user.

The System restart required message indicates the presence of the file /var/run/reboot-required. The presence of that file indicates there is a package that has requested a system reboot.

Normally Ubuntu and Debian packages can trigger the creation of this file in their post-installation script postinst.

Generally, a reboot is usually required when an update such as security patches to the Linux kernel has been installed that only come into effect after reboot.

You can run this command to find the packages that requested the reboot.

$ cat /var/run/reboot-required.pkgs

The result is a list of packages awaiting reboot for example:

linux-image-4.4.0-92-generic linux-base

You typically don’t need to restart your Linux system the moment you see the restart message. It is important to note that you will be vulnerable to any security problems fixed in the new kernel until you reboot.

To get rid of the System Restart Required message without restarting, you can remove the reboot flag file using this command.

$ sudo rm /var/run/reboot-required

We do not advise this as you may tend to forget to reboot the system, therefore, keeping the *** System restart required *** notice alive.

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.

Источник

Why is server restart required? [duplicate]

When logging into my Ubuntu instance I get the message *** System restart required *** . I am running a server and uptime is very important for me. How can I know why the restart is required? I have setup automatic security updates and I suspect one of those updates requires a restart. I only want to restart the server if the updated software is relevant to my setup.

Читайте также:  Linux all cron jobs

2 Answers 2

Any number of different updates can require you to reboot.

  • Kernel upgrades
  • Some core C/C++ library changes
  • Updates which can only be applied with a reboot to fully close an affected service’s code that is part of the core OS
  • Certain undefined library updates which Security Team suggests a reboot to fix (the latest glibc vulnerability for instance, or some SSL library updates)

Unfortunately it is impossible to state what specifically is causing your system to say it needs rebooted, because there’s so many potential causes for a reboot to be needed.

Inspect the content of /var/log/dpkg.log and see what packages have been installed recently. There have been a lot of kernel and openssl/openssh/etc vulnerabilities patched, and any services that are already running will have loaded copies of the old libraries into ram, and they will stay there continuing to be vulnerable until you either manually restart the affected services, or you simply reboot the host. If the package that was upgraded was a kernel package (linux-image, etc) then a reboot is the only way to get the new kernel runnning.

sudo zgrep -h 'status installed' /var/log/dpkg.log* | sort | tail -n 100 

will show you the last 100 packages installed on your host. It’s up to you to decide if you want to reboot it or not.

I believe there is a setting you can add to the unattended-upgrades package that will allow it to reboot automatically when the update is complete. If you can set the upgrades to occur at, say, 3am when you know load is light, the impact of such a reboot may be minimal.

Unattended-upgrades does, as I understand, only install packages where there is a security impact, so I wouldn’t put off rebooting the server very long if it’s exposed to the public internet.

Источник

Handling System Restart Required on Ubuntu

Seeing *** System restart required *** every time you log on to your Ubuntu server? Here’s why you see this and what you can do with it.

Seeing *** System restart required *** every time you log on to your Ubuntu server? You are not alone.

If you use an Ubuntu server, you might have come across the message that notifies you that your system needs a restart. This specially happens if you are using a Digital Ocean droplet.

System Restart Required Ubuntu

What is this message? Why you see it and should you really restart your server that could result in a downtime? I’ll explain all these things in this article.

What to do with System Restart Required message on Ubuntu?

The message is self-explanatory for the most part. Your Linux system thinks that system should be restarted. Usually you would see this message after installing kernel updates. Some security patches will only come into effect when you reboot the system.

Читайте также:  Conan exiles сервер linux

How do you know if it was a kernel update that caused the system restart request? There is a way to find it out.

cat /var/run/reboot-required.pkgs linux-base linux-base

In my case, the restart was request by the Linux image base package. You may also see something like linux-image-x.x.x-xx-generic. This indicates that a recent Linux kernel update needs a system restart.

Should you really restart your system every time you see *** System Restart Required ***?

That’s the important question. A restart equals a downtime. Services and applications running on the server will be unavailable for duration of the restart unless you have a better mechanism like a load balancer in place. Imagine losing traffic to your website or service disruption because of the restart.

But not restarting your system could also mean that important updates won’t be applied properly and your server would be vulnerable.

What should you do? Should you restart the server or not?

One way could be to see the latest changelog of the package that requested the restart.

The changelog will show the entire history of the said package. You should only look at the latest entry in the changelog and see if it displays an urgency of high, emergency or critical. If that’s the case, you must restart Ubuntu server.

linux-base (4.5ubuntu1~16.04.1) xenial; urgency=low * Update xenial to the latest linux-base. (LP: #1766728) -- Thadeu Lima de Souza Cascardo [email protected]> Tue, 24 Apr 2018 18:36:02 -0300

If the urgency is low or medium, it’s up to you if you want to restart the server or not. You may also delete the file /var/run/reboot-required so that it won’ show you the ***System Restart Required*** at the login. This message may return in future if a newer system update thinks that system restart is needed.

When should you restart the server?

Best practice in the industry is to restart the system at the lowest activity time. If you are managing your server for a while, you should have an idea when your server is at its lowest network usage. Server restart normally takes less than a minute if it’s one of the VPS or cloud servers offered by Linode or Digital Ocean.

You don’t need to be online while restarting the server. Just use the shutdown command in Linux and schedule a reboot. However, it’s a good practice to monitor these activities for unintended behaviors.

How to avoid a restart even for security patches

I understand that you wouldn’t want to restart your system even during low activity time. Thankfully, Ubuntu’s parent company, Canonical, does provide a way to handle this.

Читайте также:  Music creation on linux

With their live patching service, you can install updates to your Linux kernel without restarting the server. This service is free for personal usage on three Ubuntu installs. You’ll have to create an Ubuntu One account for using the livepatch service.

Bottom line

A system restart is generally required when an update to the Linux kernel has been installed. Its really up to you what you want to do if you see the ‘System restart required’ message.

If you can restart the system, you should do it. If there are constraints, restart your system for high, critical or emergency patches. Using Canonical Livepatch service is also a good idea.

I hope you learned a few new things about system patches and checking changelog. If you have questions or suggestions, please do leave a comment below.

Abhishek Prakash

Creator of Linux Handbook and It’s FOSS. An ardent Linux user & open source promoter. Huge fan of classic detective mysteries from Agatha Christie and Sherlock Holmes to Columbo & Ellery Queen.

Источник

*** System Restart Required *** – Automated Linux Kernel Patches

System Restart Required

You keep seeing this message *** System Restart Required *** when you log in to Linux. In this article we will see what updates have triggered this message and how to apply them.

This message indicates the presence of the file /var/run/reboot-required . Ubuntu packages can trigger the creation of this file in their post-installation script postinst .

A restart is usually required when an update to the Linux kernel has been installed. These are often security patches that only come into effect after reboot.

The file /var/run/reboot-required.pkgs lists the packages that requested the reboot. To view this file:

You should see a list of packages awaiting reboot:

Above we can see there is a Linux kernel security update linux-image-4.4.0-92-generic and linux-base , which requires a system restart.

You typically don’t need to restart right away, but you’ll be vulnerable to any security problems fixed in the new kernel until you do.

Another way to to find out what packages have been recently installed is to run:

This will show you the last 100 packages installed. Important updates to the Linux kernel typically begin with linux-image- .

If you just want to get rid of the ***System Restart Required*** message without restarting, you can remove the reboot flag file.

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

p.s. I increased my AdSense revenue by 200% using AI 🤖. Read my Ezoic review to find out how.

Источник

Оцените статью
Adblock
detector