?
Solved

Upgrading Kernel on Ubuntu 10.0.4 machine

Posted on 2012-03-23
4
Medium Priority
?
759 Views
Last Modified: 2012-03-25
Hello,

I have an Ubuntu 10.04.3 LTS machine (VM).  The Kernel is setting at: 2.6.32-33-server
When I ran the command to search for image upgrades (sorry can't remember the exact command)...something like this: ap search linux-image, there are a whole slew of images to upgrade to.  I was suggested that I update due to some security vulnerabilities as this is a public facing web server.

I have this on a VMWare environment, so I can easily take a snapshot and roll back if something breaks.

If you have a specific suggestion, I would appreciate that.   Also some straight forward  commands that I can use to update it would be much appreciated.

Thanks,
D
0
Comment
Question by:dan_ch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
legolasthehansy earned 1000 total points
ID: 37759404
It should be
aptitude search linux-image
and
aptitude safe-upgrade


See here
http://www.tcpdump.com/kb/os/linux/ubuntu-kernel-upgrade-procedure.html
0
 
LVL 10

Assisted Solution

by:pfrancois
pfrancois earned 1000 total points
ID: 37760589
First issue:
sudo aptitude safe-upgrade

Open in new window


After that, you need only to keep the most recent linux-image. First be sure to run the most recent one. If you reboot after the upgrade, normally, the most recent kernel will be loaded by default.

There is a shell oneliner command to remove all the older images but the current one:
dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y remove 

Open in new window

This latter command will prevent you from multiplying unused kernels into your VM.
0
 

Author Comment

by:dan_ch
ID: 37761024
Gentlemen,

Thanks for the responses.  So my question is that with these 2 commands below, with the "sudo aptitude safe-upgrade" command, must I also actually type the name of the image I want/need??

aptitude search linux-image

sudo aptitude safe-upgrade


This is a 64-bit Ubuntu OS.  Any suggestions as to which specific image would be a good image to load?

Thanks,
0
 

Author Comment

by:dan_ch
ID: 37762981
Thanks guys for the help.  I went ahead and ran your commands as noted:
aptitude search linux-image
sudo aptitude safe-upgrade

Then ran this to remove image 2.6.32-33-server:

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y remove

Then per the link's instructions: sudo init 6

I am now safely upgraded to
linux-image-2.6.32-39-server

I'll accept both answers as they were both helpful!
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question