Gigabyte B450M D3SH motherboard randomly changing UEFI boot order
I have this Gigabyte B450M D3SH motherboard running my now ancient AMD Ryzen 2200G with 16 GB RAM. If my memory serves right, it was working as expected with the original BIOS. Since I always like shiny things (software side when free) I went to update the BIOS sometimes a few months ago. Initially I attributed the random changes of boot order to CMOS battery outage and kept postponing the battery change. Recently I finally managed to change the battery but still the problem persists.
I multiboot between various Linux installations and Windows installs. So I use rEFInd as my boot manager. Whenever I set it as boot manager it works for the next reboots until the computer is shutdown. On reboot it takes the Windows bootloader from my second hard drive and boots into it straight away. I thought it might be something to do with secure boot, but even when I have set Fedora as the default boot, it still goes to Windows.
Now the only way I have of booting any other OS is by getting into BIOS.
Windows is messing with that. A feature of modern UEFI boot, that OS-s can change boot order. This can be useful, after OS installation you don't have to manually change back boot order from the usb to the internal drive. The problem is usually windows like to reset this to itself...
I guess with the bios update some settings were reset to default, that's why the behavior changed. Maybe reset your bios settings, and try to set up everything again from scratch, some old settings may be still active from the old firmware, etc.
This is not Windows' fault here. It has not been doing it for the past 10+ years. I think this has happened due to either some random hardware issue or bad BIOS update.
I did a reset by selecting Optimised settings but the story remains the same. I probably need to flash an older BIOS and check.