Jump to content
Search

The new Ubuntu Wiki is live. Legacy content may be unavailable and page links may have changed. Read the announcement on Discourse.

Always show GRUB at startup

From Ubuntu Wiki

Allowing GRUB to appear on startup offers at least two user benefits:

  • Easy access to Advanced Options > Recovery Mode
  • Convenient path to UEFI Settings

After booting into Ubuntu, open the GRUB configuration file in an editor such as nano:

sudo nano /etc/default/grub

Enter your user password then locate the lines similar to those below:

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_OS_PROBER=true

Change two lines as follows:

GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
Note
GRUB_TIMEOUT is the delay in seconds before Ubuntu boots.

If using nano, press Ctrl o to save and Ctrl x to exit.

Update GRUB with the following command:

sudo update-grub

The output should be similar to below:

sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/kdump-tools.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-38-generic
Found initrd image: /boot/initrd.img-7.0.0-38-generic
Found linux image: /boot/vmlinuz-7.0.0-34-generic
Found initrd image: /boot/initrd.img-7.0.0-34-generic
Found linux image: /boot/vmlinuz-7.0.0-31-generic
Found initrd image: /boot/initrd.img-7.0.0-31-generic
Found memtest86+ 64bit EFI image: /boot/mt86+x64
Found memtest86+ 32bit EFI image: /boot/mt86+ia32
Found memtest86+ 64bit image: /boot/mt86+x64
Found memtest86+ 32bit image: /boot/mt86+ia32
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

Close the terminal, power off the machine, and then power it back on to confirm that the configuration changes have been successful.

On startup, you should now see GRUB.