Some people try updating to Windows 8.1 from the Windows Store, after some boot times they get this error message: "Couldn't update to Windows 8.1. We restored your previous version of windows. Error code: 0x80070002 - 0x20009". And then the system automatically restores to Windows 8.
If you experience this error code I suggest that you should try one of the below methods.
Method 1:
If you connected a second drive or any external drive to your PC (a SSD or HDD) the upgrade will fail if the second (original) drive is not disconnected. Just remove the secondary drive and all external drive, reboot and try installing the Windows 8.1 update.
Method 2:
If you do not have any external drive connected to your PC, boot the computer in a clean boot state and then try to install and check. Booting the computer in a clean boot state uses a minimal set of drivers and start-up programs. A clean boot helps eliminate software conflicts.