edit boot menu ubuntu 11.4 / windows 7

Asked by Niels Haver

I´d like to edit my boot menu

                                                GNU GRUB versie 1.99~rc1-13ubuntu3
_______________________________________________________________________________________________________

Ubuntu, met Linux 2.6.38-8-generic-pae
Ubuntu, met Linux 2.6.38-8-generic-pae (herstel modus)
Previous Linux versions
Memory test (memtest86+)
Memory test (memtest86+, serial console 115200)
Windows 7 (loader) (on /dev/sda1)
Ubuntu 9.04 (9.04) (on /dev/sda5)
Ubuntu 9.04 (9.04) (on /dev/sda5)
Ubuntu 9.04 (9.04) (on /dev/sda5)
Ubuntu 9.04 (9.04) (on /dev/sda5)
Ubuntu 9.04 (9.04) (on /dev/sda5)
______________________________________________________________________________________________________

I have formatted sda5 so I´d like to take it from the grub list. It is repeated 5 times after I upgraded Ubuntu 10.4 to 11.4. I don't need to keep Previous Linux versions eather. Which is the easiest way to edit the grub list?

Many thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
delance
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you remove the old kenels It will clean up for you.

If you can give the output of:

dpkg -l | grep linux-image-2; echo; uname -a

I can give commands to clean you up.

Revision history for this message
delance (olivier-delance) said :
#2

How to remove kernels from Grub2 menu.

--------------------------------------

In the Grub menu, you have for each kernel two lines:

- first one for normal boot

- second for recovery boot (usefull to manage issues like graphic driver)

Each time update-manager install a new kernel, it keeps the previous kernel.

Sometimes a new kernel doesn't support your hardware, and to be able to boot and fix issue, you need to use previous kernel. Unfortunately, it means that after some times you get lot of kernels in menu.

The best solution is to uninstall via packet management the previous kernels.

The solution is provided in:

   http://www.go2linux.org/clean-linux-kernel-images-grub-menu

You could also install packet startup-manager to edit boot configuration files: sudo apt-get install startup-manager

Revision history for this message
Niels Haver (nielshaver) said :
#3

When applying the first answer:

nielslnx@nielslnx:~$ dpkg -l | grep linux-image-2; echo; uname -a
rc Linux-image-2.6.32-24-generic 2.6.32-24.43
             Linux kernel image for version 2.6.32 on x86/x86_64
rc Linux-image-2.6.32-25-generic 2.6.32-25.45
             Linux kernel image for version 2.6.32 on x86/x86_64
rc Linux-image-2.6.32-26-generic 2.6.32-26.48
             Linux kernel image for version 2.6.32 on x86/x86_64
rc Linux-image-2.6.32-27-generic 2.6.32-27.49
             Linux kernel image for version 2.6.32 on x86/x86_64
rc Linux-image-2.6.35-24-generic 2.6.35-24.42
             Linux kernel image for version 2.6.35 on x86/x86_64
rc Linux-image-2.6.35-25-generic 2.6.35-25.44
             Linux kernel image for version 2.6.35 on x86/x86_64
rc Linux-image-2.6.35-27-generic 2.6.35-27.48
             Linux kernel image for version 2.6.35 on x86/x86_64
rc Linux-image-2.6.35-28-generic 2.6.35-28.50
             Linux kernel image for version 2.6.35 on x86/x86_64
rc Linux-image-2.6.38-8-generic 2.6.38-8.42
             Linux kernel image for version 2.6.38 on x86/x86_64
rc Linux-image-2.6.38-8-generic-pae 2.6.38-8.42
             Linux kernel image for version 2.6.38 on x86

Linux nielslnx 2.6.38-8-generic-pae #42-Ubuntu SMP Mon Apr 11 05:17:09 UTC 2011 i686 i368 GNU/Linux

_____________________________________________________________________________

Probably those are previous Ubuntu 10.1 and 10.4 versions, however the Ubuntu 9.04 (9.04) (on /dev/sda5) not because I have formatted the sda5 partition. Is there a possibility to edit the GRUB boot menu itself by the e key?

Revision history for this message
Best delance (olivier-delance) said :
#4

You should keep the two last version: 2.6.38-8-generic and 2.6.38-8-generic-pae.
sudo apt-get remove linux-image--2.6.32-24-generic linux-image-2.6.32-25-generic linux-image-2.6.32-26-generic linux-image-2.6.32-27-generic linux-image-2.6.35-24-generic linux-image-2.6.35-25-generic linux-image-2.6.35-27-generic linux-image-2.6.35-28-generic
sudo update-grub
and reboot

Revision history for this message
Niels Haver (nielshaver) said :
#5

Thanks delance, that solved my question.