Installing Windows 10 on SSD

Yesterday I tried to install Windows 10 from a USB stick, created with the Media Creation Tool. I chose a custom installation, after booting from the USB. The setup successfully found my drive and I could create a new partition on the SSD, but that was as far as I got at first. The error message was something like failed to use the selected partition, see log files.

After some research I found that the most common error is that the SATA hard disk mode must be changed from IDE to AHCI in BIOS.

After changing to AHCI everything seemed fine, and the setup continued installation Windows on my SSD. However, when the setup rebooted my computer I still got the error Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key, even after selecting the SSD as the primary boot device. I tried disconnecting all other hard drives, but still got the same error.

After some more frustrated Googling for the problem, without any result, I decided to try the whole procedure once more. This time it actually worked. I have no idea what went wrong the first time. Perhaps a read error from the USB stick, or a write error to the SSD. In any case, I finally successfully installed Windows 10.