Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Upgrading Kernel on Ubuntu 10.0.4 machine

Posted on 2012-03-23
4
Medium Priority
?
761 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

Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

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.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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

609 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