Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add more clarify on when to reboot. Added more headings.

...

This is to allow the administer fine grained control. The more higher level of updates, the more risk to a system.

Table of Contents

upgrade

Package Update using upgrade is the safest and covered in Setup Ubuntu Linux Base Server. The command to upgrade is,

...

Notice line 5 indicates that kernel upgrade is required because of the keyword image.Optionally, record

Gather Information

Record the current kernel information. For In this example, the current kernel version is 2.6.32-33,

Code Block
languagebash
uname -a
Linux krypton 2.6.32-33-server #72-Ubuntu SMP Fri Jul 29 21:21:55 UTC 2011 x86_64 GNU/Linux
cat /proc/version_signature
Ubuntu 2.6.32-33.72-server 2.6.32.41+drm33.18

Perform Upgrade

Run the upgrade,

Code Block
languagebash
sudo apt-get dist-upgrade

Verify that a reboot is required by checking Pay attention to the kernel information. For example,

Code Block
languagebash
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-image-2.6.32-40-virtual
The following packages will be upgraded:
  linux-image-virtual linux-virtual
2 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.2 MB of archives.
After this operation, 33.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? 

In the above response, we can see that the new kernel version will be 2.6.32-40.

Check for Reboot

First, check if a program requires a reboot by looking for the reboot-required file. If the file does not exist you will not need to reboot.

Code Block
languagebash
cat /var/run/reboot-required
*** System restart required ***

However, that's not the end of it. Sometimes this file will not be populate. For example, if you run the kernel version commands you might find, as in the below example, the updated kernel has not yet taken effect. In this case, a reboot would be required.

Code Block
languagebash
uname -a
Linux krypton 2.6.32-33-server #72-Ubuntu SMP Fri Jul 29 21:21:55 UTC 2011 x86_64 GNU/Linux
cat /proc/version_signature
Ubuntu 2.6.32-33.72-server 2.6.32.41+drm33.18

Reboot

If all goes well you will get back in. If not, get console access, reboot the system and select the previous kernel during the initial boot.

...