Upgrade – Do All Updates, Including Kernel, Take Effect Without Rebooting


I use 11.04.

When I upgrade a package, it shows a message similar to this :

  Unpacking replacement libkrb5support0 ...
  Preparing to replace libgssrpc4 1.8.3+dfsg-5ubuntu2.2 (using .../libgssrpc4_1.8.3+dfsg-5ubuntu2.3_amd64.deb) ...      

a kernel message:

  Examining /etc/kernel/postinst.d.
  run-parts: executing /etc/kernel/postinst.d/dkms 2.6.38-13-generic /boot/vmlinuz-2.6.38-13-generic
   * dkms: running auto installation service for kernel 2.6.38-13-generic----------------------------------------------
    *       vboxhost (4.1.18)...                                                                                 [ OK ]
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.38-13-generic /boot/vmlinuz-2.6.38-13-generic
    run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.38-13-generic /boot/vmlinuz-2.6.38-13-generic
    run-parts: executing /etc/kernel/postinst.d/update-notifier 2.6.38-13-generic /boot/vmlinuz-2.6.38-13-generic
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.38-13-generic /boot/vmlinuz-2.6.38-13-generic                                          

Do all packages, even kernel upgrades, take place without a need to reboot now?

If yes, how they do it? Is this true in all versions of Ubuntu?

Thank you~

Best Answer

Kernel updates will need a reboot to complete.

After a kernel update, the new kernel is installed but Ubuntu continues to run to old kernel until reboot. upon reboot, the new kernel is loaded.

Most other updates can be done with the system running, any open applications that were updated run the old version until they are restarted but the system does not have to be restarted, just the application. This is because the running application is loaded into the RAM so they continue to happily run the older, loaded version until they restart at which time they reload from the hard disk with the new version.

About the kernel update message you posted;

This update message is telling you that the new kernel is being installed and the system boot files updated and then finally that Grub is being updated to find the new kernel and then add it to the boot list as the default version at boot. While the new kernel is installed on the disk and set as the default boot selection, it will not be loaded until reboot.

If you install one of the updates that need a reboot to take affect, after a short time the gear icon on the top right hand corner of your screen(assuming you are using Unity) will turn red to notify you that you need to restart. If you try to log off when a restart is needed a dialog box will pop up notifying you that a reboot is needed and asking you if you would rather restart instead of logging off.

Edit: I forgot to mention that this is true not matter what version of Ubuntu you are running.