1
I have a mini PC that always boots into Windows no matter what boot order is set in UEFI. I thought there was a startup script on ESP/EFI partition that was overwriting the boot order at every startup so I removed the ESP partition, created it again and recovered the boot configuration using Windows 10 installation media. But that did not change anything. The PC still boots Windows by default. To boot from a live USB I have to press F7 and then select the entry for the USB. I also tried installing Ubuntu as well as Phoenix OS but they only boot for the 1st time (using F7 again) and never boot after that. I read these pages: https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#UEFI_Shell
https://software.intel.com/en-us/articles/efi-shells-and-scripting
How to delete OS from boot menu
but 'bcfg' did not work (looks like my efi shell does not support the command) and neither did 'fs0 - edit startup.nsh' (it does open fs0 saying it is not mapped)
I also tried mounting ESP partition in Windows and explore what is there. I did not find any startup.nsh there. There are 3 directories: Microsoft, Boot and PhoenixOS. Boot and PhoenixOS contain bootia32.efi, Microsoft contains lots of files including the .efi ones.
I am looking for a way to get rid of any startup script and use UEFI boot menu instead and I was wondering if anyone could point me to a right direction. Any help will be greatly appreciated.
Updates:
NVRAM entry Boot0001 pointing to EFI/Microsoft/Boot/bootmgfw.efi being created on every startup. Does anyone have an idea on where such script is being stored and how to disable It?
I tried replacing boot loader but it did not work. The solution for me was running WinToAnd.exe from Windows again and then uncheck the box "Remember your OS selection". After that I was able to wipe the drive completely and install Linux Mint. The box have been running Mint for about 6 months now without a single issue. – AndriusWild – 2018-09-19T13:46:28.573