Years ago all the boot loader info was stored on the hard drive But with EFI info about your boot order and other things are written to non volatile ram (nvram).

Fortunately if this gets rewritten some way causing your boot to fail you can boot from a linux live cd and fix the boot order. The command sudo efibootmgr -v

Will list the current efi bootorder info. Heres an example

BootCurrent: 0001 Timeout: 1 seconds BootOrder: 0001,0002,0003,0004 Boot0001* Fedora HD(1,GPT,169488ad-b0e9-4819-8c29-758cb8b129ec,0x1000,0x12c000)/\EFI\fedora\shimx64.efi0000424f dp: 04 01 2a 00 01 00 00 00 00 10 00 00 00 00 00 00 00 c0 12 00 00 00 00 00 ad 88 94 16 e9 b0 19 48 8c 29 75 8c b8 b1 29 ec 02 02 / 04 04 34 00 5c 00 45 00 46 00 49 00 5c 00 66 00 65 00 64 00 6f 00 72 00 61 00 5c 00 73 00 68 00 69 00 6d 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00 data: 00 00 42 4f Boot0002* UEFI:CD/DVD Drive BBS(129,,0x0) dp: 05 01 09 00 81 00 00 00 00 / 7f ff 04 00 Boot0003* UEFI:Removable Device BBS(130,,0x0) dp: 05 01 09 00 82 00 00 00 00 / 7f ff 04 00 Boot0004* UEFI:Network Device BBS(131,,0x0) dp: 05 01 09 00 83 00 00 00 00 / 7f ff 04 00

You can change the BootOrder with the command sudo efibootmanager -b 0001,0004 -A Where the 0002,0004 are the boot items you want to use. assuming 0004 is a windows partition in a multiboot setup