windows 10, is the culprit, it likes to break repair the EFI system after an update.
Yes, windows update replaces \EFI\Microsoft\Boot\bootmgfw.efi, but not \EFI\Boot\bootx64.efi. No idead about a upgrade currently.
In my opinion Windows may write to \EFI\Microsoft\. That's the operation system efi folder.
The hardware is broken: prefering \EFI\Microsoft\Boot\bootmgfw.efi creates a windows only machine for average end user. The clean solution would be to change the UEFI implementation, to be done by the hardware manufacturer.
Yes, it's simpler to change the OS part.
https://h30434.www3....tu/td-p/2503733There is some sort of a "recovery feature" or so that on every boot sets the very first UEFI load option to point to one of the two locations, in this order:
\EFI\Microsoft\Boot\bootmgfw.efi
\EFI\Boot\bootx64.efi
This option is displayed as "OS boot Manager" (for the first path) and something akin to "UEFI partition" for the second path, completely ignoring the actual name given to it (when you look at the EFI variables through efibootmgr, you can see that what is displayed as "OS boot Manager" actually is set to the name "Windows Boot Manager"; why anyone would do such renaming is beyond me).
BCD file to point at my shim.ef
bootmgfw.efi dosn't chainload another efi boot loader.
It may load another efi apllication.
Do you use Windows 10 pro?
Try a shutdwon script.
Given a file \efi\boot\shim.efi
Testing, brute force windows UEFI:
mountvol.exe s: /s
bcdboot c:\windows /s s: /F UEFI
UEFI boots Windows by default.
mountvol.exe s: /s
S:\EFI\Microsoft\Boot>copy bootmgfw.efi bootwin.efi
menuentry "UEFI: Windows /EFI/Microsoft/Boot/bootwin.efi" {
chainloader /EFI/Microsoft/Boot/bootwin.efi
}
Set a shutdown script at Group Policy Editor gpedit.msc:
cd /d C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown
notepad grub.cmd
%SystemRoot%\system32\mountvol.exe s: /s
(echo. &echo %date% %time%) >> bootmgfw.log
dir s:\EFI\Microsoft\Boot\bootmgfw.efi >> bootmgfw.log
cd /d S:\EFI\Microsoft\Boot
copy \efi\boot\shim.efi bootmgfw.efi /y
%SystemRoot%\system32\mountvol.exe s: /d
.
No windows update in between: At next UEFI boot, grub is loaded.
May be add this at shut up too.
If there is a windows update interference, next boot goes to windows.
A second boot should give grub back.