This error is a generic installation error, which means it can be numerous causes. I have listed some solutions below for more common culprits. If these troubleshooting steps do not solve your error, please leave a comment.
You get the error:
Windows 8 installation has failed
If I click “OK”, I’m rolled back to Windows 7.
Solutions:
1. Incompatible hardware drivers
Run Windows Update and make sure you are fully updated prior to starting the install. You may also want to check your hardware manufacturer’s website to make sure you have the latest drivers.
Try disconnecting all unnecessary hardware, such as USB drives or printers, then reboot your PC and try again. This is called a “hardware clean boot” and will minimize the chance that an incompatible device is causing the error.
2. Temporary User Profiles
Make sure that there is only one user account logged in. If there are multiple users logged in, log off the other users and reboot.
From an administrator account, delete any user profiles not in use. (Make sure to back up your data prior to this step.)
3. The USB drive may not contain enough memory
If the error occurs when trying to create installation media on a USB drive, there may not be enough space on the USB drive. Make sure the USB drive has at least 4 GB of free space.
4. The hard drive may not contain enough memory
– Make sure that your hard drive partition has enough disc space. The 32-bit version of Windows 8 requires 16 GB of free space, while 64-bit Windows 8 requires 20 GB.
5. A STOP error may have occurred
Such errors normally appear as bluescreen errors, but in this case may have been hidden by the generic installation error. Try downloading and running the System Update Readiness Tool, which can fix some of these errors. You can find the download link here