How to remove or hide the GRUB boot menu?

8,046

Solution 1

To not see the GRUB menu while booting:

  1. Open the /etc/default/grub file using from terminal entering: gksu gedit /etc/default/grub
  2. Change GRUB_TIMEOUT=10 to GRUB_TIMEOUT=0
  3. Save the file and quit the text editor.
  4. Run: sudo update-grub
  5. Reboot.

This will remove the time that you need to wait for the GRUB menu to disappear.

IMPORTANT: If then you need to change to Recovery mode in some instance just press ESC when Linux starts. That is between when the BIOS finishes loading all necessary stuff and the Operating System starts. Then the GRUB menu will appear giving you the change to select the recovery mode.

Solution 2

I believe a better solution is to use the value:

GRUB_HIDDEN=1 

then set the time out to something longer than 0 this way you can access grub since its hidden in the background, and you have a chance of actually stopping the boot sequence and selecting another kernel / recovery mode.

a feature that can come in handy when you have a broken system. You can read more about it here

Solution 3

The answers above didn't work for me so I thought I'd post this for completeness. In my version of grub the timeout screen doesn't hide when the GRUB_TIMEOUT=0. This seems to be a bug filed here: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1273764.

An easy (but not so elegant) workaround is to set your GRUB_TIMEOUT=0.1. Apparently there is a script which overrides the value of the timeout when it = 0 for the user's own good!

My grub configuration file just for anyone who wants to see is:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0.1
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=0.1
GRUB_DISTRIBUTOR='lsb_release -i -s 2> /dev/null || echo Debian'
GRUB_CMDLINE_LINUX_DEFAULT="splash" 
GRUB_CMDLINE_LINUX=""

Solution 4

Another possibility if Windows has been removed from the computer is:

  1. Delete the Windows boot loader from the ESP. This will normally be done by typing sudo rm -rf /boot/efi/EFI/Microsoft.
  2. Type sudo update-grub.

When the update-grub script runs, it should note that there's no Windows and therefore generate a grub.cfg file that includes no option to boot Windows and that doesn't present the menu.

Note, however, that this approach makes it impossible to boot Windows. This is fine for Behzadsh, since the question specifies that Windows has been removed from the computer. (In fact, this approach essentially finishes the task of the incomplete removal that's already been done.) This approach is wrong for somebody who simply wants to bypass the GRUB menu but still retain the ability to boot Windows -- say, by using the computer's built-in boot manager to boot Windows. This approach will make it impossible to boot Windows, at least until the Windows boot loader is restored.

Share:
8,046

Related videos on Youtube

Behzadsh
Author by

Behzadsh

A [Not Pro] web developer

Updated on September 17, 2022

Comments

  • Behzadsh
    Behzadsh over 1 year

    Recently I decided to use only Ubuntu and there is no Windows in my laptop. When I turn on my laptop the GRUB menu is showing but I don't need to choose OS anymore.

    How can I remove or hide this?
    And after removing this how could I access to recovery mode?

    • Mussnoon
      Mussnoon over 13 years
      Do you mean recovery mode on Windows or on Ubuntu?
    • Behzadsh
      Behzadsh over 13 years
      recovery on ubuntu, there is no Windows in my laptop anymore
  • Behzadsh
    Behzadsh over 13 years
    So, we actually remove the time, not the grub!?
  • Luis Alvarado
    Luis Alvarado over 13 years
    IF you remove grub, TRUST ME, you will not be able to boot nothing. I am giving you a workable solution to your question "how can I remove or hide this" because if i tell you to delete the grub folder or anything to eliminate it, i rather give myself negative points in askubuntu.
  • Jere
    Jere almost 10 years
    doesn't work for me in crunchbang waldorf...
  • mook765
    mook765 about 7 years
    I can't find anything about the GRUB_HIDDEN-option in the provided link. I even cant find this option in the Grub Manual. There are other options with similar names like GRUB_HIDDEN_TIMEOUT and GRUB_HIDDEN_TIMEOUT_QUIET, so what the GRUB_HIDDEN-option actually does?