I recently bought a new HP computer, it is running on Windows 10 and I installed Ubuntu 16.04, but everytime I turn on the PC it goes straight to Windows, so how can I fix this to set up grub at the boot time. I can access Ubuntu from Windows Advanced Restart settings, but that's the only way. I have disabled the secure boot on the bios and the fast startup for Windows but it didn't work.
6 Answers
Run this from windows command prompt
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
- 2,011
This issue can be resolved by installing boot-repair package by following these steps:
1) Open a terminal and run these commands:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
2) Then run boot-repair by sudo boot-repair and use "Recommended repair". Then boot-repair will scan boot paths and correct them and update your grub configuration and set grub as the default bootloader of your system.
- 345
efi expects the default boot loader to be /efi/boot/bootx64.efi. windows is particular about making sure it boots.
fist off, from 8.1 on windows does not really shut down, it suspends to disk ( like a hibernate) so that it boots faster. second it changes EFI to make entry 0000 (windows) first in the boot order.
the work around: rename grubx64.efi to bootx64.efi then replace the file efi/boot/bootx64.efi.this makes grub the default boot loader.
second: when in ubuntu, use efibootmgr to delete all efi entries. and reboot your computer. Make sure the first system you boot into is ubuntu so that it is placed in entry 0000. then boot windows.
third: some bios updates look in MBR for a loader even though it is a gpt/efi disk. I assume this is a compatibility issue (upgrades from a MBR formated disk). windows will have a loader there. Install grub to the MBR as well as doing the above.
- 6,924
I use dual boot in UEFI mode and when it boots directly to windows. Type these commands in command promt as administrator in windows.
To change the boot manager from windows to ubuntu, use: bcdedit /set "{bootmgr}" path \EFI\ubuntu\grubx64.efi
To change the boot manager from ubuntu to windows, use: bcdedit /set "{bootmgr}" path \WINDOWS\system32\winload.efi
To change the boot manager, i always use windows to change these settings.
hope it works.
Its 2025 and i had the same problems with my windows 11 and endeavour os, after the bios resetting to factory, my linux wouldn't show up, in my hp laptop i pressed F10 and in bios i had Disabled the secure boot option, its fixed, and my grub boot loader came up, also make sure in the bios setup your linux be selected as default, have a great day