Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ubuntu seems to require a reboot after almost every apt update, even those that do not include a new kernel version. Why?

share|improve this question
    
I think you can improve the quality of your question by adding the list of packages involved in one of your updates. it makes the discussion more specific. –  sazary Mar 27 '11 at 13:36
    
@ahm: Yes, I realised that. I noted on the accepted answer that I'll try to keep track of the packages before I complain again. –  user13032 Mar 27 '11 at 18:38
add comment

5 Answers 5

up vote 13 down vote accepted

I guess you are referring to the latest update.

It included a package called linux-firmware which is a package that provides firmware used by the Linux kernel drivers so it was a kernel related update.

So to answer your question or better to correct that statement, Ubuntu doesn't need to be restarted on every update but just on updates which are related to kernel stuff.

share|improve this answer
2  
I suppose my sample was biased. I'll try to be more scientific next time. –  user13032 Mar 26 '11 at 12:44
1  
If rebooting that often is a problem for you, a package called ksplice is usable free in Ubuntu. It allows the kernel to be patched on the fly. Very impressive. –  Nerdfest Mar 26 '11 at 13:36
    
@Nerdfest: I just hibernate or suspend my laptop, so every reboot is a nuisance. I hadn't heard of ksplice -- thanks. –  user13032 Mar 26 '11 at 13:46
    
As a warning, if you hibernate with an upgraded kernel, you will lose your state. I think suspend is okay though. –  Nerdfest Mar 26 '11 at 18:58
    
You only need to reboot for the updates to take effect. For users who restart daily, there isn't much sense in a premature reboot. –  user unknown Mar 26 '11 at 19:01
add comment

I'm not sure of all the packages that require a reboot to finish the upgrade, but it is easy to find out why in specific cases.

The warning is triggered by a postinst script in the package. It creates the file /var/run/reboot-required The file /var/run/reboot-required.pkgs will list the packages that require the reboot.

share|improve this answer
add comment

It's worth saying that Linux also needs rebooted after other package updates too.

I'm a big Ubuntu fan but the frequency of package updates (because it's so bleeding edge) is far higher than other distributions.

The extent of which has meant I've dropped Ubuntu on some Servers in favour of Debian.

If anyone else can add to this list of packages that need a reboot it would be appreciated.

I use the superb checkrestart from debian-goodies (it uses lsof) to check when older libraries are still in use.

Updating these packages force a reboot:

Kernel packages (not all, like the meta packages) libc dbus

I'm only really concerned with Ubuntu Server and not the Desktop because only rebooting my Servers gives me a headache!

share|improve this answer
3  
Bleeding Edge? Lots of packages from the Debian repositories that I'm interested in are years out-of-date. –  user13032 Mar 26 '11 at 13:34
    
I was referring to other distributions too, not just Debian-based flavours. The package versions in Ubuntu are far newer than most others which makes them less proven and more prone to updates. –  Jonathan Ross Mar 26 '11 at 14:03
    
@Tim: Read again, he wrote "bleeding edge" in regards to Ubuntu. –  Adam Byrtek Mar 26 '11 at 14:11
    
@Adam: Ubuntu uses the Debian repositories AFAIK. s/Debian/Ubuntu/ ín my comment if you want to. –  user13032 Mar 26 '11 at 14:22
    
@Tim: I think he meant the release cycle, but to be honest the answer is a bit difficult to comprehend. –  Adam Byrtek Mar 26 '11 at 14:25
show 3 more comments

If you don't want to, here is a solution for desktop Linux use: http://www.ksplice.com

share|improve this answer
3  
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  Stephen Myall Aug 15 '12 at 11:22
    
That's a fair point. –  Vadi Aug 16 '12 at 6:29
    
@Vadi You can edit your answer now to add more information, if you so choose. –  Eliah Kagan Sep 1 '12 at 17:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.