Why is my boot menu getting longer?
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.
Solution 1:
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?
Solution 2:
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.