I was testing OS deployment on a machine that had previously failed.
When I re-deploy an MDT task sequence to it, it returns error 0x80070002 near the beginning around the step "Use Toolkit Package".
If I run the same task sequence on a new unknown machine, everything is fine and deployment completes.
Because the new machine finished the deployment, I started guessing that in the first failed deployment, it left something on the hard drive that prevents the machine from running another OS deployment.
I subsequently tried to deploy a simple task sequence to that failed machine (success) and then deploy the same MDT task sequence to it and everything is ok.
My guess is that the step "initialization - partition if necessary" was skipped and old files from the first failed deployment remains and caused the failure if I tried deploying a task sequence to that machine again.
How do I force the "Partition if Necessary" step to run everytime?
SCCM 2012 SP1
Windows Server 2012