In this article, we’ll walk you through the process of displaying the GRUB (GRand Unified Bootloader) menu during boot in Ubuntu systems with UEFI (Unified Extensible Firmware Interface). The GRUB menu is a list that provides the option to boot into Ubuntu or other operating systems installed on your system. By default, the GRUB menu is hidden in Ubuntu. However, you may want to display it for various reasons, such as booting into a different kernel, booting into recovery mode, or booting into a different operating system.
To display the GRUB menu during boot in Ubuntu with UEFI, you need to modify the
/etc/default/grub file. Change the value of
menu, save the changes, and update GRUB using the
sudo update-grub command. After following these steps, the GRUB menu should be displayed during boot, allowing you to select different kernels or operating systems.
Understanding GRUB and UEFI
Before we delve into the process, it’s important to understand what GRUB and UEFI are.
GRUB is a bootloader package developed to support multiple operating systems and allow the user to select among them during boot-up. It is the reference implementation of the Free Software Foundation’s Multiboot Specification, which provides a user the choice to boot one of multiple operating systems installed on a computer or select a specific kernel configuration available on a particular operating system’s partitions.
UEFI, on the other hand, is a specification that defines a software interface between an operating system and platform firmware. It is meant as a replacement for the BIOS firmware interface, present in all computers. UEFI can run in 32-bit or 64-bit mode and has more advanced features than BIOS.
Before you begin, ensure that you have:
- A system running Ubuntu with UEFI
- Administrative (sudo) privileges
Displaying the GRUB Menu
To display the GRUB menu during boot, you need to modify the
/etc/default/grub file. Here’s a step-by-step guide:
Step 1: Open the GRUB Configuration File
Open the terminal and run the following command:
sudo nano /etc/default/grub
This command opens the GRUB configuration file in the nano text editor. The
sudo command is used to run the operation with administrative privileges.
Step 2: Modify the GRUB Configuration File
In the opened file, look for the line
GRUB_TIMEOUT_STYLE=hidden. This line tells the system to hide the GRUB menu at boot.
Change the value of
menu. The line should now look like this:
This change tells the system to display the GRUB menu at boot.
Step 3: Save Changes and Exit
Save the changes you’ve made by pressing
Ctrl + X, then
Y, and finally
Enter. This sequence of keys will save the changes and exit the nano text editor.
Step 4: Update GRUB
After making changes to the GRUB configuration file, you need to update GRUB for the changes to take effect. Run the following command in the terminal:
This command generates a new GRUB configuration based on the changes you made in the
After following these steps, the GRUB menu should now be displayed during boot, allowing you to select different kernels or operating systems. If you don’t see the GRUB menu, ensure that you’ve followed all the steps correctly and that your system is using UEFI. If you’re still facing issues, you may want to seek help from the Ubuntu community or other online Linux forums.
Remember, understanding and modifying system files like the GRUB configuration file is a powerful tool, but it also carries risks. Always ensure you understand the changes you’re making, and consider backing up important data before making changes to system files.
To check if your system is using UEFI, you can open the terminal and run the command
ls /sys/firmware/efi. If the command returns any output, it means that your system is using UEFI.
Yes, you can change the timeout value for the GRUB menu. In the
/etc/default/grub file, there is a line that says
GRUB_TIMEOUT=5. You can modify the value to change the timeout duration. For example, if you want the menu to appear for 10 seconds, you can change the line to
GRUB_TIMEOUT=10. After making the change, remember to run
sudo update-grub for the changes to take effect.
To set a specific operating system as the default option in the GRUB menu, you need to modify the
/etc/default/grub file. Look for the line
GRUB_DEFAULT=0 and change the value to the index number of the desired operating system in the GRUB menu. The index number starts from 0, so the first option is 0, the second option is 1, and so on. After making the change, run
sudo update-grub to apply the changes.
If you want to hide the GRUB menu again after displaying it, you can change the value of
GRUB_TIMEOUT_STYLE in the
/etc/default/grub file from
hidden. After saving the changes, run
sudo update-grub to update the GRUB configuration. This will hide the menu during boot.
Yes, you can customize the appearance of the GRUB menu by modifying the
/etc/default/grub file. You can change the colors, background image, font, and other visual aspects of the GRUB menu. However, customizing the appearance requires modifying the GRUB configuration files and may involve more advanced steps. It is recommended to refer to the official GRUB documentation or seek assistance from the Ubuntu community or online forums for detailed instructions on customizing the GRUB menu.