Enable AHCI After Installing Windows

I had Windows installed on an SSD with the IDE option set in the BIOS. After switching the BIOS setting to AHCI, Windows kept blue-screening on boot. The fix is simple, but it has to happen before the BIOS change.

The fix

Open a command prompt with administrative rights and tell Windows to boot once into safe mode:

bcdedit /set {current} safeboot minimal

Reboot, change the SATA mode to AHCI in the BIOS, let Windows start in safe mode, then remove the safe-boot flag (as administrator):

bcdedit /deletevalue {current} safeboot

Reboot one more time. Windows now boots normally in AHCI mode. The one safe-mode boot works because that boot path loads a minimal driver set that includes the AHCI storage drivers, which marks them for the normal boot too — skip the bcdedit step and you get INACCESSIBLE_BOOT_DEVICE, which is exactly the BSOD you saw the first time.

Why bother: AHCI is faster than IDE emulation. It enables NCQ (native command queuing) and hot-plug for SATA drives, and the system feels more responsive. Tested on Windows 7, 8 and 8.1; the same trick is still what you need on Windows 10 and 11 whenever an older install (or an OEM image) ships with the controller in IDE mode. You can verify the mode under Device Manager → IDE ATA/ATAPI controllers: a “Standard SATA AHCI Controller” entry means you’re done.

Check TRIM while you’re in there

Also remember to check that TRIM is enabled for your SSD. While Windows is designed to detect most SSDs automatically, sometimes it doesn’t work as intended — and TRIM is what keeps writes fast over the drive’s life. To check, run (as administrator):

fsutil behavior query DisableDeleteNotify

You get one of two results: 0 means TRIM is enabled, 1 means it is not. (On Windows 10 build 16299 and later the same query reports NTFS and ReFS lines separately.) You can enable TRIM with:

fsutil behavior set DisableDeleteNotify 0

Or disable it with:

fsutil behavior set DisableDeleteNotify 1

Don’t disable it on an SSD without a specific reason (rare cases such as certain RAID configurations or drive-recovery scenarios); with no TRIM, an SSD’s write performance degrades badly over time. The full flags and defaults are documented in Microsoft’s fsutil behavior reference.

Leave a Reply

Your email address will not be published. Required fields are marked *