2 different Ubuntu kernels appearing in GRUB

Asked by barrett-h

I'm running Ubuntu 8.04 in a dual-boot environment on a single HD shared with Win XP. After installing Ubuntu and then the updates, I now have two different Ubuntu 8.04 kernels appearing in GRUB (in addition to their respective recovery modes, memory test, & Win XP): 2.6.24-18 and 2.6.24-16.
While everything appears to be functioning properly (& both kernels appear to work), surely I don't need both kernels on my HD and surely not in GRUB. Assuming it is fine to delete the (older) kernel, how do I safely do so - from the GRUB and/or from my HD?
While I am able to open up the /boot/grub/menu.lst via sudo gedit, I need any/all instructions to be detailed.

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Connor Imes
Solved:
Last query:
Last reply:
Revision history for this message
Goedson Teixeira Paixão (goedson) said :
#1

You just need to remove the corresponding linux-image package. To check which linux-image packages you have installed, run this command:

dpkg -l linux-image-*

You'll probably see something like this:

ii linux-image-2.6.24-1-686 2.6.24-6 Linux 2.6.24 image on PPro/Celeron/PII/PIII/P4

(This example is from my machine which is running Debian Sid)

Then, you can remove the package with the following command:

sudo dpkg --purge linux-image-2.6.24-1-686

changing the package name to match the one in your system.

Revision history for this message
barrett-h (barretth767) said :
#2

entering in terminal:
sudo dpkg --purge linux-image--2. 2.6.24-16* or -16 or -16.30
(the last being the exact form of the response to the dpkg -l linux-image-* command, in addition to the -18s which I want to keep)
all resulted in:
dpkg - warning: ignoring request to remove linux-image-2. which isn't installed.
and
dpkg - warning: ignoring request to remove 2.6.24-16*/-16/-16.30 which isn't installed.

Revision history for this message
Best Connor Imes (ckimes) said :
#3

I would suggest that you leave both kernels there. This is useful if you ever have to troubleshoot a kernel, or one just simply stops booting - you then have a fallback kernel that you know works, and with that you can reinstall or fix the newer kernel.

If you really do want to remove the kernel, you can also check Synaptic by searching for "linux-image" and completely removing the older kernel.

Revision history for this message
barrett-h (barretth767) said :
#4

Thanks Connor Imes, that solved my question.