How to Get Ubuntu to Boot Before Windows

Young business woman sitting in the conference room office working on the project and achieving success.
urbazon / Getty Images

When you choose the option to install Ubuntu alongside Windows the expected result is that when you boot the computer a menu will appear with options to boot either Ubuntu or Windows.

Sometimes things do not go to plan and Windows boots first without any option appearing for starting Ubuntu.

In this guide, you will be shown how to fix the bootloader within Ubuntu and if this fails you will be shown how to fix the issue from the computer's UEFI settings if this fails.

Use efibootmgr to Change the Boot Order Within Ubuntu

Change UEFI bootorder with efibootmgr

The menu system used to provide options for booting Windows or Ubuntu is called GRUB.

To boot in EFI mode each operating system will have an EFI file.

If the GRUB menu doesn't appear it is usually because the Ubuntu UEFI EFI file is behind Windows in the priority list. 

You can fix this by booting into the live version of Ubuntu and running a couple of commands.

Simply follow these steps:

  1. Insert your live Ubuntu USB drive into the computer.
  2. Open a terminal window and type the following command:
    sudo apt-get-install efibootmgr
  3. Enter your password and press Y when asked whether you want to continue.
  4. A list will appear with the following information:
    BootCurrent: 0001
    Timeout: 0
    Bootorder: 0001, 0002, 0003
    Boot 0001 Windows
    Boot 0002 Ubuntu
    Boot 0003 EFI USB Drive
    This list is only indicative of what you might see.
    The BootCurrent shows the item that is currently booting and so you will notice that the BootCurrent in the list above matches against Windows.
    You can change the boot order using the following command:
    sudo efibootmgr -o 0002,0001,0003
    This will change the boot order so that Ubuntu is first and then Windows and then the USB drive.
  5. Exit the terminal window and reboot your computer
    (Remember to remove your USB drive)
  6. A menu should now appear with the option to boot Ubuntu or Windows.

The Failsafe Way to Fix the Bootorder

Boot Setup Screen

If the first option doesn't work then you need to use the UEFI settings screen for your computer to adjust the boot order.

Most computers have a button you can press to bring up a boot menu. Here are the keys for some popular brands:

  • Acer - Escape, F12, F9
  • ASUS - Escape, F8
  • Compaq - Escape, F9
  • Dell - F12
  • EMachines - F12
  • HP - Escape, F9
  • Intel - F10
  • Lenovo - F8, F10, F12
  • Packard Bell - F8
  • Samsung - Escape, F12
  • Sony - F10, F11
  • Toshiba - F12

You only have to press one of these keys for the boot menu to appear. Unfortunately, each manufacturer uses a different key and a manufacturer doesn't even keep it standard across its own range.

The menu that appears should show Ubuntu if it is installed and you can boot using this menu.

It is worth noting this isn't permanent and so you will need to press the relevant key again to show the menu every time you boot.

To make the option permanent you need to go into the settings screen. Again each manufacturer uses its own key for accessing the settings.

  • Acer - Delete, F2
  • ASUS - Delete, F9
  • Compaq - F10
  • Dell - F2, F12
  • EMachines - Tab, Delete
  • HP - Escape, F1, F10
  • Lenovo - F1, F2
  • Packard Bell - Delete, F1
  • Samsung - F2
  • Song - F1, F2, F3
  • Toshiba - Escape, F1, F12

A menu will appear at the top and you should look for one called boot settings.

At the bottom of the screen, you should see the current boot order and it will show something like this:

  • Windows
  • Ubuntu 
  • USB

To get Ubuntu to appear above Windows look at the bottom of the screen to see which button you have to press to move an item up or down the list.

For example, you will have to press F5 to move and option down and F6 to move an option up.

When you have finished press the relevant button to save the changes. For example F10.

Note that these buttons differ from one manufacturer to another.

Ubuntu Does Not Appear as an Option

Ubuntu Launcher

In some circumstances, you can't see Ubuntu in either the boot menu or the settings screen.

In this case, it is likely that Windows and Ubuntu were installed using different boot methods. For example, Windows was installed using EFI and Ubuntu was installed using legacy mode or vice versa.

To see if this is the case switch to the opposite mode to the one you are using. For example, if the show you are booting in EFI mode switch to legacy mode.

Save the settings and reboot the computer. You will probably find that Ubuntu now boots but Windows doesn't. 

This isn't ideal and the best fix for this is to switch to whichever mode Windows is using and then reinstall Ubuntu using the same mode.

Alternatively, you will have to keep switching between legacy and EFI mode to boot either Windows or Ubuntu.