View Full Version : [ubuntu] [SOLVED] Why I have 2 kernels

jay li
December 12th, 2008, 09:22 AM
When Ubuntu starting I see these options:

Ubuntu 8.10. kernel 2.6.27-9-generic
Ubuntu 8.10. kernel 2.6.27-9-generic (recovery mode)
Ubuntu 8.10. kernel 2.6.27-7-generic
Ubuntu 8.10. kernel 2.6.27-7-generic (recovery mode)
Ubuntu 8.10. memtest86+

I know it's changed after one of the system updates, so how can I remove the old kernel from the list?

December 12th, 2008, 09:27 AM
that is because you have updated the kernel, normally the system sets the boot to the newest kernel. it is often recommended you keep your one previous kernel in case of problems with the new version.

ubuntu won't delete your old kernels for you, you will have to do it yourself,(I forgot exactly what the command is) and remove them from your menu.lst file.

I wouldn't worry about it.

December 12th, 2008, 09:28 AM
Open the Package Manager and look for the package "linux-image". You'll find kernel 2.6.27-7-generic and be able to remove it if you wish.
However, I should advise you to remove a kernel only after being sure that everything works fine with the new one. Test each new kernel after an update before removing it.

jay li
December 12th, 2008, 09:49 AM
Thank you both, waspbr and Kobalt.

BTW, Kobalt, where is "Package Manager" located?

December 12th, 2008, 09:51 AM
System > Administration > Synaptic Package Manager

December 12th, 2008, 09:52 AM
To launch Synaptic, choose System > Administration > Synaptic Package Manager

EDIT: Ninja'd :(

December 12th, 2008, 09:55 AM
I don't recommend deleting the old kernel. It might produce problems. It's not too large, so don't worry about the size. The sized saved are just not worth the trouble you might get.

jay li
December 12th, 2008, 10:16 AM
Thanks guys I found it, and I decided to take your advices and keep it that way.

December 12th, 2008, 11:05 AM
and if you wish to keep the old kernel,but just hide it from the boot menu,do

gksudo gedit /boot/grub/menu.lstand place a Hash(#) in front of the relevant entries ie

title Ubuntu 8.10
root (hd0,4)
kernel /vmlinuz-2.6.27-7-generic root=UUID=f780bda5-460b-453d-81d3-1af3e6de8fb2 ro quiet splash
initrd /initrd.img-2.6.27-7-generic

#title Ubuntu 8.10
#root (hd0,4)
#kernel /vmlinuz-2.6.24-16-generic root=UUID=f780bda5-460b-453d-81d3-1af3e6de8fb2 ro quiet #splash
#initrd /initrd.img-2.6.24-16-generic

jay li
December 12th, 2008, 11:23 AM
Thanks meindian523.

Can I do the same thing to line:
"Ubuntu 8.10. kernel 2.6.27-7-generic (recovery mode)"

December 12th, 2008, 02:49 PM
yeah,to any entry,as many as you wish.That doesn't delete the kernel file or anything,just hides it from the menu.It's called commenting out,FYI.