Software⏱️ 3 min read📅 2026-06-03

How to Fix: How do I set the grub timeout and the grub default boot entry?

Configure GRUB timeout and default boot entry for dual-boot Ubuntu and Windows.

Quick Answer: Edit /etc/default/grub, update-grub, and set GRUB_TIMEOUT and GRUB_DEFAULT variables to customize the GRUB menu.

In Ubuntu 12.04 (or above), you're experiencing issues with setting the GRUB timeout and default boot entry due to dual-booting Windows (7/8) and Ubuntu. This can be frustrating, especially if you need to quickly select your operating system during boot time.

To resolve this issue, we'll walk through two methods to set the GRUB timeout and default boot entry, ensuring a smooth dual-boot experience.

⚠️ Common Causes

  • The primary reason for this issue is that GRUB's configuration file (grub.cfg) needs to be updated to reflect the changes made to the boot order. This can happen when you install or remove operating systems from your system.
  • Another possible cause could be conflicts between GRUB and Windows' bootloader, which might require additional troubleshooting steps.

✅ Best Solutions to Fix It

Editing grub.cfg manually

  1. Step 1: Open a terminal as the root user (or use sudo to elevate privileges) and navigate to the /boot/grub directory using the command `cd /boot/grub`.
  2. Step 2: Run the command `grub-mkconfig --reload` to update the grub.cfg file. This will recreate the configuration file based on your system's boot order.
  3. Step 3: To set a specific GRUB timeout, add the following line to the end of the /etc/default/grub file: `GRUB_TIMEOUT=10`. Replace 10 with the desired timeout value in seconds.

Using the grub-efi package

  1. Step 1: If you're using a 64-bit system, install the grub-efi package by running `sudo apt-get install grub-efi`. This will provide a more modern and efficient GRUB configuration.
  2. Step 2: Edit the /etc/default/grub file as described in Method 1 to set the GRUB timeout. However, for setting the default boot entry, you'll need to add the following line: `GRUB_DEFAULT=ubuntu` (assuming your Ubuntu installation is named 'ubuntu').

✨ Wrapping Up

By following these steps, you should be able to successfully set the GRUB timeout and default boot entry in Ubuntu 12.04 (or above) when dual-booting with Windows 7/8. Remember to restart your system after making changes to ensure they take effect.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions