1

Possible Duplicate:
How to remove the unwanted entries from the boot menu?

I want to limit the number of kernels shown in my boot screen to say only the two latest ones. How can I do this with the new grub? (Any method that does not require manually uninstalling all extraneous kernels is also welcome.)

apoorv020
  • 1,014

3 Answers3

1

You'd need to remove the individual kernel images you don't want. I have every kernel starting with the one packaged on the 10.04 LTS disc up to the most recent one (including the backported kernel). There's no automated process to remove old kernels, so you'd have to remove each individual image from your system using Synaptic or some other package manager.

Thomas Ward
  • 74,764
  • Exactly the kind of task that should be automated. – apoorv020 Mar 20 '11 at 17:44
  • Except that there is no automated process. This is because of the fact that should the newest kernel not operate properly, you can use the older kernel which you already know works. – Thomas Ward Mar 20 '11 at 17:48
1

A detailed procedure for removing old Linux kernels and cleaning up Ubuntu's boot menu to use just the latest and next most recent kernels is provided in a series of recent posts starting with GRUB2 revisited.

While the procedures listed in the above are all manual, one of the web references listed refers to a number of graphic tools that may be useful in modifying the boot menu. The specific article is Customise Ubuntu with GRUB.

CentaurusA
  • 2,672
  • +1 Excellent links. I assumed the start-up manager was incompatible with GRUB2, but it seems they just don't include it now. – apoorv020 Mar 20 '11 at 19:08
  • However, this tool does not remove the old kernels, and as such the old kernel images will be sitting there taking up memory space that a user might otherwise need. – Thomas Ward Mar 20 '11 at 23:23
0

Legacy GRUB had a variable in memu.lst called HOW_MANY which was how many kernels to retain which took care of this for you. One of the many legacy GRUB features we have lost. I have no idea why GRUB2 does not support this.

Dazed_75
  • 417