I have a Gigabyte X570 Aorus Pro mainboard, and in the BIOS settings I set the first boot drive to my 250GB SSD which has Windows 10 installed, and the second boot drive to my 500GB SSD which has Ubuntu 22.04 installed.
When I turn on the machine, of course Windows 10 will be booted. To get into Ubuntu, I manually press F12 upon boot, which opens the boot menu (which, to my confusing, shows the Ubuntu disk as first entry), where I pick the Ubuntu disk to boot ubuntu. When I now restart the PC again from within Ubuntu, Windows 10 will boot again, as expected.
Now the problem is, that when I repeatedly boot into Ubuntu by pressing F12 and selecting the Ubuntu disk (e.g. I install upgrades in Ubuntu and need to reboot), the boot order somehow gets changed, and when I reboot and dont interfere with F12, Ubuntu will be booted instead of Windows 10.
So it is like as if the system "remembers" that I manually booted into Ubuntu a couple of times and decides to change the boot order. I have no clue why this happens, or which setting is responsible for this behaviour.
How can I make the PC do what I set it up to do, and avoid the automatic change of settings which I don't want?
efibootmgr
? Probably not the cleanest way of doing this, but it could work.