gigabyte ga-z97mx-gaming 5 bios settings help wanted


Hi guys. I have the above motherboard that I reflashed to the latest beta BIOS and then flashed back again to the last official F6 BIOS. My problem is thus:

I have two ssd's, a samsung 850 one with relevant linux partitions, and an intel ssd with a windows 10 installation. There is a grub installation in the samsung ssd that regulates which of the two OSes should boot. The windows installation is not a gpt partition. To cut a long story short, I made a small adjustment in the Bios when I first built my system so that after the bios initialisation , the pc would find the two ssd's and then grub would take over and boot into windows or linux with great speed. It worked reliably and speedily
Unfortunately due to my flashing the Bios , my previous working setting was lost and now I am in a position where the pc will go randomly through various booting loops until it manages to find grub and let me boot to an os.
I have reset the BIOS countless time, used the default optimised settings(still not booting rapidly but going through endless bios initialisation boots) and now use the following settings: Windows 8, storage boot option control= Legacy only, boot mode selection uefi and legacy, but i keep having the same problem.. The pc will not boot reliably but will go through countless loops. I have tried various bios settings combinations with no luck. Can somebody help me with the correct settings??