Solved

Upgrading Kernel on Ubuntu 10.0.4 machine

Posted on 2012-03-23
4
755 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
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
legolasthehansy earned 250 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 250 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP error function not working on AWS 10 127
expand ext4 on centos 6 5 54
LINUX Field Separators 7 57
How to fix Dual Server Conflict GitLab vs Apache2 3 21
Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.

733 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