Windows keeps overriding the UEFI boot order even if I change it with efibootmgr from Ubuntu. However BootNext option is not overridden, that is, I can set BootNext to Ubuntu and it boots into Ubuntu upon rebooting. I, therefore wrote the following script to run every time I boot into Ubuntu :
efibootmgr > file.txt
CURR="$(grep "BootCurrent" file.txt | grep -Eo "[0-9]{4}")"
efibootmgr -n $CURR
rm file.txt
exit 0
This ensures that I can boot into grub when I reboot from Ubuntu. Is there a way to do the same from Windows so that I can boot into grub when rebooting from Windows?
EDIT :
Running bcdedit /v gives (No Ubuntu entry):
Windows Boot Manager
--------------------
identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795}
device partition=\Device\HarddiskVolume1
path \EFI\ubuntu\shimx64.efi
description Windows Boot Manager
locale en-US
inherit {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
default {9b4692db-d6e1-11e6-8040-f733056555ec}
resumeobject {9b4692da-d6e1-11e6-8040-f733056555ec}
displayorder {9b4692db-d6e1-11e6-8040-f733056555ec}
toolsdisplayorder {b2721d73-1db4-4c62-bf78-c548a880142d}
timeout 0
Windows Boot Loader
-------------------
identifier {9b4692db-d6e1-11e6-8040-f733056555ec}
device partition=C:
path \WINDOWS\system32\winload.efi
description Windows 10
locale en-US
inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
recoverysequence {9b4692dc-d6e1-11e6-8040-f733056555ec}
displaymessageoverride Recovery
recoveryenabled Yes
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice partition=C:
systemroot \WINDOWS
resumeobject {9b4692da-d6e1-11e6-8040-f733056555ec}
nx OptIn
bootmenupolicy Standard
For example, Windows 10's EFI file is usually located at one of the following locations: \EFI\boot\bootx64. efi. \EFI\boot\bootia32.
The path element of a Windows boot loader specifies the location of the boot loader on that volume. For UEFI systems, path indicates the Windows boot loader for EFI, whose path is \Windows\System32\Winload.
The Windows Boot Manager is a Microsoft-provided UEFI application that sets up the boot environment. Inside the boot environment, individual boot applications started by the Boot Manager provide functionality for all customer-facing scenarios before the device boots.
efibootmgr is a tool for managing UEFI boot entries. It is not a bootloader. It is a tool that interacts with the EFI firmware of the system, which itself is acting as a boot manager. Using efibootmgr boot entries can be created, reshuffled and removed.
On Windows you can use "bcdedit /enum firmware
" to list all firmware applications, then
"bcdedit /set {fwbootmgr} bootsequence {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
" to set BootNext option.
Don't you have to create UBuntu loader similar to {9b4692db-d6e1-11e6-8040-f733056555ec}?
Basically the ubuntu node should be changed from boot manager to boot loader app.
Then have a boot manager at EFI\Boot\bootx64.efi.
Create a {bootmgr} node for boot manager. Set its displayorder to include both the guids above. Then set the default value for {bootmgr} to ubuntu guid. That should make ubuntu item sticky across reboots.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With