myninerides said:
This is the top search result for this issue, so I'm resurrecting it for anyone who comes across this thread in the future. The fix for boot loop in Windows 10 after switching from AHCI to RAID mode:

- Switch back to AHCI mode in BIOS (in order to break the boot loop and get back into Windows).
- Use msconfig to enable safe boot (Windows Key + R, msconfig, Boot tab, Safe boot), then restart.
- Upon this restart enter BIOS settings and switch to RAID mode, exit and save.
- Boot into Windows (safe boot), use msconfig to disable safe boot, then restart.

Windows will now boot normally under RAID mode.
This worked so good for me, thank you. The only other thing I noticed when I was doing this is I think I had left M2_1 PCIE Sata Remapping enabled, which makes the NVME slot get controlled by the raid controller in bios. Disabling that and following the safe mode reboot trick worked great for me.