Multiple Ubuntu OS options on start up - deleting the ones I don't want

Asked by Lachlan Summer

I have recently dual booted Ubuntu with XP home. However I installed XP after Ubuntu, which broke something and I needed to re-install Ubuntu again to get it to boot.

Now when I start the desktop I have more Ubuntu options than I want. The menu options look like this:

Ubuntu 9.04, kernel 2.6.28-15-generic
Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode)
Ubuntu 9.04, kernel 2.6.28-11-generic
Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
Ubuntu 9.04, memtest86+
Other operating Systems:
Microsoft Windows XP Home Edition

I want to delete the unneeded Ubuntu entries (I gather they are older versions of the kernel?). There is an answer that almost solves my problem here:

https://answers.launchpad.net/ubuntu/+question/7687

So basically I should go into File System/ boot/ grub / menu.lst and delete the entries I don't want.

However I have some questions as to what exactly to delete:

1) Are the 2.6.28-11 entries the older kernel and therefore the ones to delete?
2) What is the memtest86+ entry and do I need it? (get an insufficient memory type error if I try to boot from this option anyway)
3) What text exactly should I delete out of the menu.lst file?
Is it down the bottom after ## End default Options ## and before ### END DEBIAN AUTOMAGIC KERNELS LIST,
specifically the text that says (for example):

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid 921a2379-eedc-405c-8e53-722ce7ab70b6
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=921a2379-eedc-405c-8e53-722ce7ab70b6 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

If so is it all of that text I should delete, just part of it, something else as well?

Thanks in advance for any help you can give.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Ryan Dwyer (ryandwyer) said :
#1

1) Yes, those are older kernel entries and can be deleted. They could be used if you had problems booting from the current kernel, but that's unlikely.

2) memtest is a memory testing tool. Not needed.

3) You can remove all that you listed, assuming you have an almost identical section for the 28-15 kernel. I'd comment them just for the first reboot, so if you have problems you can undo your changes.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

If you want only one option then you can run:

sudo apt-get --purge remove linux-image-2.6.28-11-generic; sudo apt-get --purge autoremove

You will then be left with only 2.6.28-15-generic

Revision history for this message
Lachlan Summer (lachlansummer) said :
#3

I assume commenting them out is just adding a # at the begging of the line, but it says I don't have the permissions to save changes to menu.lst even though I think I am the admin account (or whatever the equivalent is in linux).

Perhaps I will try actionparsnips method in the morning...

Cheers,

L

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#4

You can edit it with:

gksudo gedit

Then open the file.

If you remove the surplus kernel, it will also remove itself.

Revision history for this message
Lachlan Summer (lachlansummer) said :
#5

Thanks actionparsnip, that solved my question.

Revision history for this message
Lachlan Summer (lachlansummer) said :
#6

Thanks Ryan too, that was very helpful.