I currently have a system running Windows 10 and Elementary OS (based on Ubuntu 18.04) in a dual boot configuration. The problem (more of an annoyance actually) is that Windows 10 uses Raid On and Ubuntu uses AHCI for the SATA operation, this means that I have to go into the bios and switch between those 2 modes every time that I'd like to boot up the other operating system.
So that got me thinking, could I use a script to reboot my system and switch the mode when it turns on again? A simple batch and sh script for both operating systems. If so, what would that script look like?
EDIT People seem to downvote this question because they do not understand the use case. Switching my Windows partition to AHCI would solve my problem, but that is not what I asked for (there are other threads covering this already...). I would like to know how to create an executable script to switch between AHCI and Raid. I feel like that is a reasonable question.