4

I first installed Windows 8 and then Ubuntu. There was no Windows entry on the boot screen, so I did grub-update and now it is present, but I also have 2 additional memtest entries in the list.
Is there a way to remove those from the list and have only Windows and Ubuntu there?

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
George Irimiciuc
  • 143
  • 1
  • 1
  • 4

3 Answers3

7

If it's just the memtest options you don't want, you can simply remove that package:

sudo apt-get remove memtest86+

You can also control the generation of the submenus (the "Advanced options for ..." entries), and the recovery options by editing /etc/default/grub. From the grub info documentation:

'GRUB_DISABLE_RECOVERY'
     If this option is set to 'true', disable the generation of recovery
     mode menu entries.

and

'GRUB_DISABLE_SUBMENU'
     Normally, 'grub-mkconfig' will generate top level menu entry for
     the kernel with highest version number and put all other found
     kernels or alternative menu entries for recovery mode in submenu.
     For entries returned by 'os-prober' first entry will be put on top
     level and all others in submenu.  If this option is set to 'y',
     flat menu with all entries on top level will be generated instead.

For more details on the grub configuration, check out:

 info -f grub -n 'Simple configuration'
Jeremy Kerr
  • 27,199
3

I know the post is old, but it still comes up in searches.

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

This will hide it from grub by setting execution bit to off. Enable it back by replacing "-" with "+".

Dzmitry
  • 31
  • 1
-2

You can edit list in the /boot/grub/grub.cfg

gksudo gedit /boot/grub/grub.cfg

or

sudo nano /boot/grub/grub.cfg

Also, please do the backup first. ;)

A.B.
  • 90,397
IDKN
  • 1
  • As it says at the top of that file (DO NOT EDIT THIS FILE), the changes will be lost next time update-grub is run (typically, when the next kernel update is installed). – Jeremy Kerr Apr 13 '15 at 07:06
  • I know about notes in the top of file. Just comment memtest in the ### BEGIN /etc/grub.d/20_memtest86+ ### conf block. – IDKN Apr 13 '15 at 07:10