My question may be about Linux ,I'm using Ubuntu 9.10 my question is I'm dual booting, my bootloader screen has too many choices how do I edit it?

Asked by koniecz

Hello,
I'm dual booting Windows 7 and Ubuntu 9.10. The problem is , after many botched installs my boot screen has some extra entries that I should not have. How do I edit them out. Is there a program that does this? Help, I'm new to this so please be gentle with me. I'm one of those guys who knows enough to get in trouble. I'm coming over from the pioneer days in dos.
Thank you,
Michael

Question information

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

Hello, i think this might help:
Entries should be removed by editing or removing files in the /etc/grub.d folder. The /boot/grub/grub.cfg file is read-only and should not normally require editing.

    * Automatically.
          o Too Many Kernels? Kernels removed via Synaptic or with "apt-get remove" will automatically update grub.cfg and no user action is required.
                + In Synaptic, type the kernel number in the search window at the upper right (for example - 2.6.28-11).
                + Find the "linux-image" and "linux-headers" files for the applicable kernel (example - linux-image-2.6.26-11 or "linux-image-2.6.26-11-generic).
                + Right click and select "Mark for Complete Removal" and then press the Apply main menu button.
                + The kernels will be removed from your system and from the Grub menu.
                + If you are not sure of the kernel you are currently using, in a terminal type "uname -r".
                + Many users keep one previous kernel on the machine which previously ran without problems.
          o Other Operating Systems which have been removed from the computer will also be removed from the menu once "update-grub2" is run as root.
          o To prevent one of the /etc/init.d files from running, remove the "executable" bit.
                + Example: If you don't want to see the "Memtest86+" entries, run this command:
                  Code:

                  sudo chmod -x /etc/grub.d/20_memtest86+

                + Run the update-grub command to allow the changes to be incorporated in grub.cfg

      User-Created Entries.
          o To remove a user-created menu entry, remove the applicable file from the /etc/grub.d folder.
          o If a custom file contains multiple entries, individual items may be removed and others retained.
          o Once the file has been removed or edited, run "update-grub2" to update grub.cfg.

This was taken from http://ubuntuforums.org/showthread.php?t=1195275 theres more help there
Hope this help you.

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

Can you please give the output of:

dpkg -l | grep linux-image

Thanks

Revision history for this message
Aurevoir (aurevoir) said :
#3

Do this
1. sudo chmod +w /boot/grub/grub.cfg
2. sudo gedit /boot/grub/grub.cfg
3. place # in front of any menuentry you don't want to see at the boot screen

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

If you edit grub.cfg the next time you run:

sudo update-grub

or install / remove a kernel, the change will be wiped so editting the file is only good until this point. Changes will be lost each time these things happen.

Revision history for this message
koniecz (koniecz) said :
#5

Thank you all. The support is great.
Thank you,
Michael