448

My system is not dual-boot, I run a standard Ubuntu desktop system "on the metal" (I think running it in a VM is the same).

Pressing c while booting does not cause the GRUB menu to appear (which I believe it does for a dual-boot system).

How can I get the GRUB-menu to present itself on a single-boot system?

Robert Houghton
  • 231
  • 1
  • 3
  • 9
Peter.O
  • 24,681
  • 39
    +1 excellent question to expose an essentially undocumented feature of Ubuntu boot process, the answer to which I only found by accident while groveling through grub.cfg. Thanks for hoisting this up to the top (Googleable) level. – msw Dec 03 '10 at 15:29
  • 8
    Credit where credit is due... This issue came up in another question of mine (buried deep in the comments). Jorge Castro suggested that it would be a good idea to present as a question it its own right... (so credit to him.... and I'm happy to bask in the reflected glow ;) I can see the value of it being a primary Q/A. – Peter.O Dec 03 '10 at 15:45

10 Answers10

433

Menu will appear if you press and hold Shift during loading Grub, if you boot using BIOS. When your system boots using UEFI, press Esc.

For permanent change you'll need to edit your /etc/default/grub file:

Place a # symbol at the start of line GRUB_HIDDEN_TIMEOUT=0 to comment it out. If that line doesn't exist, then you can comment out this line instead: # GRUB_TIMEOUT_STYLE=hidden, and then change GRUB_TIMEOUT=0 to GRUB_TIMEOUT=5, for instance, to give the grub menu a 5 second timeout before it automatically logs you in.

Save changes and run sudo update-grub to apply changes.

Documentation: https://help.ubuntu.com/community/Grub2

  • 6
    @codeMonk: Oops! (I've deleted my previous comment because I was on the wrong track)... I originally misunderstood the context of "GRUB_TIMEOUT=0". The context you mean is in relation to the "permanent" display of GRUB-menu... I thought you meant in relation to the "Shift" key method... It is true that for a permanently recurring display, you need both "#GRUB_HIDDEN_TIMEOUT=0" and "GRUB_TIMEOUT=NON-ZERO", as described in the link in the answer ... (I've just test it both ways.) – Peter.O Dec 03 '10 at 17:24
  • It's only the left shift-key that works. At first I couldn't figure out what I was doing wrong--how hard can it be to hold the Shift key? Finally, I read carefully the link you provide and realized that it specifically says the left shirt key. – Isaac Betesh Dec 02 '16 at 18:48
  • 14
    Holding left shift didn't work for me :( – Nick Apr 30 '17 at 22:31
  • Can somebody fix this answer? To my experience, the comments, and the answer below, it is obsolete and now a lot of it is just wrong (like the timeout advice). – Mike Wise Feb 02 '18 at 10:10
  • 22
    In Ubuntu 18.04 there is no GRUB_HIDDEN_TIMEOUT=0 line in my /etc/default/grub - instead there is GRUB_TIMEOUT_STYLE=hidden (Shift during boot never worked for me (Dell?)). Any idea what to do? – jena Aug 22 '18 at 09:10
  • 21
    @jena I found the advice at the top of /etc/default/grub helpful: i.e., to have a look at info -f grub -n 'Simple configuration'. This explains the options. Use GRUB_TIMEOUT_STYLE=menu to have the menu shown. Or press ESC if you keep the setting at hidden but want to see the menu. – bovender Feb 18 '19 at 10:18
  • 1
    @bovender Thanks, I figured it out later and forgot to write it here. Anyway, Esc still doesn't work for me, but I just set a short time (3s) for the menu, so if I need it I can use it and if not, it's not a big deal (the default 10s is too long). – jena Feb 21 '19 at 15:37
  • 7
    Grub changes with each release, please consider adding version informatoin. The fact for example that this works only for 14.04. It sure is not relevant anymore for 18.04 – onknows Apr 12 '19 at 18:18
  • On 20.04 holding the right shift key did not work but holding both down did! YMMV :). The official docs don't mention which key you should hold down :( – Russell Fulton Mar 22 '21 at 03:05
  • 1
    Holding the Esc key on a UEFI system with Ubuntu 18.04 takes me to the grub> prompt. How to get to the grub menu where you can select different kernel? – Alecz May 27 '21 at 13:59
  • I can no longer edit my comment. Found that pressing F1 brings the Grub menu on a Dell laptop with UEFI boot. – Alecz May 27 '21 at 14:05
  • When pressing ESC while in the grub menu it returns to the previous menu which is the command line at first. Since you where opening the grub menu with ESC by holding the key, it took you to the menu and then directly to the command line. You can open the menu on startup by pressing ESC every 1-2 seconds instead, making sure to not press it again once the menu is shown (may take a few tries). Apparently there is a way to get back to the menu from the command-line using normal but I didn't try that myself. – MangoNrFive Sep 24 '22 at 13:12
  • None of these suggestions seem to work on ubuntu server 22 – Tiago Dec 19 '22 at 12:29
100

I have tried both the Shift and Space keys but nothing works. Only the Esc key works for Ubuntu 14.04 and 16.04 to get Grub Menu at boot time.

Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
MAK
  • 1,109
41

In Ubuntu 18.04, there is no GRUB_HIDDEN_TIMEOUT=0 line in /etc/default/grub - instead there is GRUB_TIMEOUT_STYLE=hidden. According to info -f grub -n 'Simple configuration' :

if this option is unset or set to 'menu', then GRUB will display the menu and then wait for the timeout set by 'GRUB_TIMEOUT' to expire before booting the default entry. Pressing a key interrupts the timeout.

So if you either remove or comment out the line as:

#GRUB_TIMEOUT_STYLE=hidden

and run sudo update-grub, then the menu will show by default.

18.04 + Not dual boot, boots in grub 5 seconds:

GRUB_TIMEOUT_STYLE=false

GRUB_TIMEOUT= (no value). Works fine LVM.

Arya
  • 631
20
  • Keep hitting Shift until you see "Grub Loading Message"
  • After the message, hold the Shift down until the menu appears.
cmcginty
  • 5,888
  • This is the nuance that helped me finally get in! Thank you! :) – ATSiem Oct 24 '14 at 03:35
  • 3
    That so does not work for me. No matter what I do to this poor SHIFT key, this Intel NUC skips the grub menu :( – yPhil May 16 '16 at 23:22
  • 2
    @yPhil Intel NUC is the freak who eats Shift. It works everywhere else. I'm lucky that Esc works for my NUC, but it didn't seem to work for you, did it? – Franklin Yu Aug 24 '18 at 15:36
16

By default, GRUB will show the menu if there is a second operating system installed. If only Ubuntu is installed, then GRUB will generally load Ubuntu without showing the menu. To reconfigure GRUB to always show a menu:

  1. Edit /etc/default/grub:

    Set GRUB_HIDDEN_TIMEOUT= (no value after the = sign).
    Set GRUB_TIMEOUT=n to show the menu for n seconds.

  2. Run update-grub to regenerate /boot/grub/grub.cfg based on the /etc/default/grub settings.

You can get GRUB to show the menu even if the default GRUB_HIDDEN_TIMEOUT=0 setting is in effect:

  • If your computer uses BIOS for booting, then hold down the Shift key while GRUB is loading to get the boot menu.
  • If your computer uses UEFI for booting, press Esc several times while GRUB is loading to get the boot menu.

Hopefully this clears up confusion as to why Shift works for some users and Esc works for others.

200_success
  • 1,249
  • 11
  • 21
10

Edit /etc/default/grub (sudo -H gedit /etc/default/grub)...

change:

GRUB_TIMEOUT_STYLE=hidden

to:

GRUB_TIMEOUT_STYLE=menu

then save the file and quit the editor. Next run:

sudo update-grub 

GRUB_TIMEOUT_STYLE

If this option is unset or set to menu, then GRUB will display the menu and then wait for the timeout set by GRUB_TIMEOUT to expire before booting the default entry. Pressing a key interrupts the timeout.

If this option is set to countdown or hidden, then, before displaying the menu, GRUB will wait for the timeout set by GRUB_TIMEOUT to expire. If ESC is pressed during that time, it will display the menu and wait for input. If a hotkey associated with a menu entry is pressed, it will boot the associated menu entry immediately. If the timeout expires before either of these happens, it will boot the default entry. In the countdown case, it will show a one-line indication of the remaining time.

heynnema
  • 70,711
8

For newer Ubuntu versions there is no GRUB_HIDDEN_TIMEOUT instead there is GRUB_TIMEOUT_STYLE which is set to hidden by default.

Open the file sudo nano /etc/default/grub Change value of GRUB_TIMEOUT_STYLE from hidden to menu and make sure GRUB_TIMEOUT is not set to 0 then run

sudo update-grub

Done!!!

knoftrix
  • 419
3

I've heard Shift does it. But I've used Space before and it worked.

Habitual
  • 254
0

Simple answer:

In the file /etc/default/grub, set GRUB_TIMEOUT=1, not 0. (Or set it to some other positive number, which is interpreted as seconds.) Then run sudo update-grub after saving the edit.

Terminal one-liner to do this:

sudo sed -i 's/^.*GRUB_TIMEOUT=.*$/GRUB_TIMEOUT=1/' /etc/default/grub && sudo update-grub
Majal
  • 7,711
-1

For me, I found the issue was that I had left a USB stick plugged in to the computer. I suppose the computer was attempting to boot from the USB stick.

Once I had removed the USB stick, I could press shift or esc or space (depending on the version of Ubuntu you are using, I think).

Flimm
  • 41,766