I recently tried to install Windows 10 on my laptop but on multiple occasions it returned to Windows 8.1 right after running the setup.
HP Envy M6 Touch Smart Intel i5 4200U 8GB RAM Samsung 840 EVO 256GB MSATA SSD Hitachi 750GB 5400rpm drive
The notebook originally only came with the spindle 750GB drive, the bios on this machine is not configured to boot from the mSATA ssd drive if a regular 2.5″ is installed. It always looks for the bootloader on the spindle drive. Had to place the bootloader manually on the spindle drive to get it to boot from the mSATA ssd.
The fact that the bios wouldn’t go to the ssd was causing the installation of Windows 10 to fail.
Quick and simple fix, pull the spindle drive and re-run the Windows 10 setup, worked like a charm.
So if you come across a similar situation where after running the Windows 10 setup the system would return you to your old OS, pull out all the extra drives and just boot with your primary OS drive. Once the setup is successfully done, you can put the other drives back in.