20

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?

2
  • Do you mean recovery mode on Windows or on Ubuntu?
    – Mussnoon
    Dec 24, 2010 at 23:24
  • recovery on ubuntu, there is no Windows in my laptop anymore
    – Behzadsh
    Dec 25, 2010 at 9:54

5 Answers 5

26

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.

2
  • 1
    So, we actually remove the time, not the grub!?
    – Behzadsh
    Dec 25, 2010 at 17:46
  • 11
    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. Dec 25, 2010 at 18:30
8

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

2
  • doesn't work for me in crunchbang waldorf...
    – Jere
    Jun 7, 2014 at 16:56
  • 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?
    – mook765
    Mar 24, 2017 at 11:51
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=""
1

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.

1

Hide GRUB menu while dual booting For newer versions of Ubuntu


This solution was tested on Ubuntu 18.04 LTS.

You can still open GRUB menu by pressing shift key while booting. Otherwise it will automatically open choosen system.


To do that you need to make changes in file /etc/default/grub. However after updating GRUB settings the changes won't be visible due to one of scripts which is used to generate final file. That's why you need to make additonal changes. I recomend to backup files in case something went wrong.

Here are the steps you need to do:

  1. Edit grub file:
sudo nano /etc/default/grub

You need to edit these two parameters:

GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0

You can choose default system in parameter: GRUB_DEFAULT=0 Where the bolded number corresponds to options sequence in GRUB menu.

  1. You have to edit script 30_os-prober which overwrite these changes while dual booting. The scripts used along with /etc/default/grub while doing update-grub can be found at /etc/grub.d.
sudo nano /etc/grub.d/30_os-prober

Around line 30 in this file in function: adjust_timeout () {
if [ "$quick_boot" = 1 ] && [ "x${found_other_os}" != "x" ]; then\

You need to comment these line by adding # at the beginning.

#set timeout_style=
#if [ "${timeout}" = 0 ]; then
#set timeout=10
#fi

  1. After doing that you need to generate new grub.cfg file.
sudo update-grub
  1. You can check if these line are commented by checking new generated file grub.cfd
cat /boot/grub/grub.cfg
  1. Now you can reboot your computer and check if changes work.

Link to answer

2
  • Don't we need the boot menu when dual booting?
    – cipricus
    Sep 29, 2023 at 12:13
  • @cipricus everyone has different use cases, but if you insist you might ask the OP Nov 17, 2023 at 17:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .