1. Boot to Windows using IDE mode. (Do not use AHCI mode).
2. Open registry editor (type regedit on search bar and press enter to open it)
3. Expand the list HKEY_LOCAL_MACHINE / SYSTEM / CurrentControlset / Services.
4. Look for msahci, click on it
5. Look at the right panel, right click on start and select modify.
6. In the value Data insert value 0 (zero)
7. Click OK, close registry editor then reboot.
8. Enter Bios Upon power on and now you can enable AHCI mode.
The method above is a common steps I used (in Windows 7), however there is another way to do it and this steps works with Windows 10.
1. Boot in Your Windows normally, open command prompt as admin.
2. We want to set our computer to boot in safe mode so, type:
bcdedit /set {current} safeboot minimal
Then press enter
3. Restart your computer, Enter BIOS and change IDEO into AHCI. Press F10 to exit and save changes.
4. Now we want our computer to boot normally, so to cancel the safe mode once again open Command prompt as admin.
type
bcdedit /deletevalue {current} safeboot
Press enter and reboot.
Done.