Antergos / Arch Linux / Kali Linux / Linux · August 9, 2018 4

How to default boot GRUB along with windows 10 on UEFI Boards

Few laptops mostly HP come with default OS as Windows, so they always try to boot from Windows EFI system.
They by default look for EFI/Microsoft/Boot/bootmgfw.efi even you have already installed grub.
To deal with this kind of situation you have to mainuplate the efi boot file, so every time it looks for efi boot file it should get grub efi file instead of windows efi.

On some systems the efi boot directory can be found at following location

/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi

and on other systems (like arch linux) it can be found here

/boot/EFI/Microsoft/Boot/bootmgfw.efi

Here we go, we are going to set default efi file as grub instead of windows
So we first take a backup of original efi boot file

# cp /boot/EFI/Microsoft/Boot/bootmgfw.efi  /boot/EFI/Microsoft/Boot/bootmgfw2.efi

Then replace grub boot file with windows boot file

# cp /boot/EFI/GRUB/grubx64.efi /boot/EFI/Microsoft/Boot/bootmgfw.efi

Note: On ubuntu systems /boot/EFI/GRUB may be replaced by /boot/efi/EFI/ubuntu/
In that case (if you have ubuntu) run following

# cp /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi

After doing that reboot the system and it will now boot into grub instead of windows.