Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

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

After running an upgrade, ssh into the system with a new session and check if the system welcome message requests a reboot,

Code Block
languagebash
 sudo reboot

 

Table of Contents

upgrade

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

...

A reboot is almost never required., but you can verify that the reboot file does NOT exist,

Code Block
languagebash
cat /var/run/reboot-required
cat: /var/run/reboot-required: No such file or directory

From the man pages,

Panel

dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. So, dist-upgrade command may remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. See also apt_preferences(5) for a mechanism for overriding the general settings for individual packages.

...

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 populate even though it should. 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 to use the updated kernel.

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.

...