Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question is going to be little incomplete but I am sure you will guess what my problem is. So 2 days back When I restarted my machine I got 7 options on the Boot Screen instead of 5. Earlier Windows was the 5th Option (I made it default), but now some Memory test is the 5th option (Being Defaulted). How did it automatically happen? I didnt configure or changed anything.

share|improve this question
up vote 10 down vote accepted

When the Linux kernel is updated, the older kernel images stick about in case the newer ones are incompatible with your system in some way. There are two parts to each kernel image - the normal one, which you boot up with, and the recovery image, which is why the menu increases by two entries with each update. The number of older kernels doesn't usually go beyond three (plus the respective recovery images, for a total of six images) so the size of your boot menu should be fixed from now on.

You can stop the older ones from appearing by editing your grub menu file, by typing

sudo gedit /boot/grub/menu.lst

into a terminal and commenting them out with a # symbol in front of them (look around the file for examples). I assume you know how to do since you were able to set Windows as the default. You can also remove them to free up disk space if you're sure you won't need them.

The safest way, in my mind anyway, to do this is to install Ubuntu Tweak, which contains an option to remove redundant kernel images. It will display a list of the additional images and you just pick the ones you don't want, and the safety comes from the application not displaying the one that is currently loaded.

It's not advisable to get rid of all of them, either by hiding them or removing them, for two reasons. The first is that when you encounter a serious problem (usually related to hardware and usually when it's not working) the best course of action is to boot using a previous kernel image to see if the problem is resolved there. Updates to the kernel can have a nasty habit of breaking parts of one's system. The other reason is that the 'recovery' image in can be quite useful, especially if you forget your password.

share|improve this answer
Thanks for the detailed answer Chris. So any time Kernel updates will come in Ubuntu update, my boot menu will change? – t3ch Nov 30 '10 at 15:49
Also Can I comment out the image options as well? Keeping Just Ubuntu and Windows at the boot menu? – t3ch Nov 30 '10 at 15:53
@t3ch: 1. Yes, the boot menu will change with every kernel update. 2. Yes, you can comment out the other options, but I recommend that you keep the "recovery" option as well, along with Ubuntu and Windows. "Recovery" option can be useful in many scenarios, one being, if you forget your Ubuntu password. – Sid Nov 30 '10 at 16:38
@t3ch From now on your boot menu shouldn't change. Three kernel images, including their recovery images, seems to be the upper limit, after which point older ones are simply deleted. I'm going to incorporate these comments into my answer. – Chris Wilson Nov 30 '10 at 16:43
Thanks folks...... – t3ch Nov 30 '10 at 16:52

A new kernel was installed with an entry in the boot menu when you updated your system, this made the boot menu longer, and pushed the Windows boot menu entry further down.

Read this: Is there a way to remove/hide old kernel versions?

share|improve this answer
Thanks iamsid.. – t3ch Nov 30 '10 at 15:49

Just an advice: for security reasons (in case some update messes up your running kernel,etc.), i usually keep one more kernel image in my /boot folder (it has indeed proved helpful to me).

As for your follow-up q's:

  • Yes, each time you install a new kernel, your menu.lst (since you're using grub v.1) will add the new image to your list. If you want to clean up your list, you should either edit menu.lst manually or install ubuntu tweak as Chris already told you.

  • What do you mean by commenting out the image options? You can change the "title" to whatever name you want to be displayed in grub list, or your should comment out/delete all the unnecessary entries.

share|improve this answer
Hi Pavlos, "I usually keep one more kernel image in my /boot folder", how to do this? – t3ch Nov 30 '10 at 16:37
@t3ch You do it by just leaving them be. Follow the steps outlined above for hiding/removing, but leave at least one older kernel, including the recovery image, alone, so you should have four Linux kernels in total. – Chris Wilson Nov 30 '10 at 16:44
@t3ch: When a new kernel is installed, the old one remains intact. But you can remove the older kernel, Pavlov means that he doesn't do this (he also doesn't remove the menu entry): he keeps the latest kernel + the previous kernel. – Sid Nov 30 '10 at 16:47
@Chris, iamsid, Thanks folks – t3ch Nov 30 '10 at 16:51
Chris and iamsid covered me. Just as an example, if i'm currently running linux-image- and the newer linux-image-2.6.35-23-generic comes out, i'll leave both of them working (i.e. i won't delete the old one, cause i want to have it as a backup) ;-) – Pavlos G. Nov 30 '10 at 16:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.