How to Fix: Windows 10 Upgrade Sysprep Operation / Boot Phase Errors

Dennis Faas's picture

Infopackets Reader Gord F. writes:

" Dear Dennis,

I am trying to upgrade from Windows 7 to 10 but every time I run the upgrade, it fails with an error message: '0x8007002cf - 0x4000d - The installation failed in the second_boot phase with an error during migrate_data operation,' then reverts back to Windows 7. I have tried upgrading 3 times but it keeps failing. I don't know what to do. Can you help? "

Update 20200116: I'm getting a lot of emails from folks asking for help with this problem now that Windows 7 has officially reached its end of life as of January 14, 2020. If you need help with this ASAP, send me an email and don't forget to leave your phone number. I will call you back as soon as possible.

My response:

I contacted Gord and ask if he would like me to connect to his computer using my remote desktop service in order to review the problem in depth. Gord agreed. I will say that this type of error is very technical, so I will do my best to explain it in simple English. Also this error may also be related to error: 'oxc1900101 - 0x3001b - The installation failed in the First Boot phase with an error during Sysprep Operation' - as we also encountered this error after I made some progress Gord's original problem dealing with the Second Boot Phase error.

For the purpose of this article, I will assume that others will have encountered a similar problem - whether it's a first boot phase or second boot phase error - and they will be looking to this article for an answer. As such, I'll explain how I went about resolving the problem step-by-step.

How to Fix: Windows 10 Upgrade Sysprep Operation / Boot Phase Errors

The first thing I did was look at the Windows 10 upgrade log file for an answer as to why Windows 10 was failing.

Unfortunately this wasn't as easy as it sounds, because the Windows 10 installation log file (C:\$WINDOWS.~BT\Sources\Panther\setuperr.log) was protected with special permissions that made it inaccessible / unreadable even for the Administrator user. To get around this problem, I had to reset the permissions on the file so it could be opened and read in Notepad.

To change permissions on the setuperr.log file so it's readable, do the following:

  1. Click Start, then type in "cmd" (no quotes); wait for CMD or Command Prompt to appear in the list, then right click it and select Run as Administrator.
     
  2. Next, highlight the text below with your mouse:

    takeown /f C:\$Windows.~BT\Sources\Panther\setuperr.log\setuperr.log
    icacls C:\$Windows.~BT\Sources\Panther\setuperr.log\setuperr.log /reset /T
    notepad C:\$Windows.~BT\Sources\Panther\setuperr.log
    echo this is a dummy line
     
  3. Right click over the highlighted text above, then select Copy from the dialogue menu. Now, go to the administrative command prompt you just opened in Step #1, and right click in the middle of the black window. The highlighted text you just copied in Step #2 should now be output onto the command line, and if successful, the Windows Notepad program will have launched with the setuperr.log loaded.

Now, proceed to the next section.

How to Read the Windows 10 SetupErr.Log File

Now that the setuperr.log file is loaded, scroll all the way down to the bottom of the file and look at the error messages.

More often that not, when the Windows 10 installation fails (for whatever reason), it will note that it is abandoning the operation on the last permanent error it encountered. In Gord's case the setuperr.log reported "Error 5 while applying object C:\Windows\System32\Tasks\avast! Emergency Update. Shell application", and on the following line, "Abandoning apply due to error for object: C:\Windows\System32\Tasks\avast! Emergency".

Keep that in mind, and I'll explain a bit more further down. For now, take a look at Gord's snippet of the failed Windows 10 install:

2016-07-07 13:24:01, Error [0x0808fe] MIG Plugin {0b23c863-4410-4153-8733-a60c9b1990fb}: LoadRegFromFile :: OpenFile error (C:\$WINDOWS.~BT\Work\MachineIndependent\Working\srcworking\agentmgr\CCSIAgent\005A4BDD\HKLM-E0xxxx04IME.reg) gle=2
2016-07-07 13:24:07, Error SP Error WRITE, 0x00000005 while gathering/applying object: File, C:\Windows\System32\Tasks [avast! Emergency Update]. Will return 0[gle=0x00000005]
2016-07-07 13:24:07, Error MIG Error 5 while applying object C:\Windows\System32\Tasks\avast! Emergency Update. Shell application requested abort[gle=0x00000005]
2016-07-07 13:24:07, Error [0x08097b] MIG Abandoning apply due to error for object: C:\Windows\System32\Tasks\avast! Emergency Update[gle=0x00000005]
2016-07-07 13:24:08, Error Apply failed. Last error: 0x00000000
2016-07-07 13:24:08, Error SP pSPDoOnlineApply: Apply operation failed. Error: 0x0000002C
2016-07-07 13:24:09, Error SP Apply: Migration phase failed. Result: 44
2016-07-07 13:24:09, Error SP Operation failed: OOBE boot apply. Error: 0x8007002C[gle=0x000000b7]
2016-07-07 13:24:09, Error SP Operation execution failed: 13. hr = 0x8007002C[gle=0x000000b7]
2016-07-07 13:24:09, Error SP Operation execution failed.[gle=0x000000b7]
2016-07-07 13:24:09, Error SP CSetupPlatformPrivate::Execute: Failed to deserialize/execute pre-OOBEBoot operations. Error: 0x8007002C[gle=0x000000b7]

You can read the log file snippet (above) in one of two ways:

  1. First, you can search for part of the error code that was reported when Windows 10 failed (assuming you wrote it down). In Gord's case, the error code was 0x8007002cf - 0x4000d. If you search for that exact text in the log file, Notepad won't find anything. Instead, take the first set of numbers (0x8007002cf) and strip away the first two characters and the last two characters. What you end up with is 8007002. From there, use Notepad and search for 8007002 in the log file. In Gord's case, the last reference to 8007002 was also right near the end of the log file.
     
  2. Another way you can read the log file is to look for the part where it says "abandoning apply due to error" or such. This "abandon statement" is also near the final 8007002 error code. If you look just slightly above the abandon statement, you will see reference to a file and folder path - in this case, it is "C:\Windows\System32\Tasks\avast! Emergency Update"
     
  3. Now, if you pay attention to the folder and filename paths in reference to this error, then it will give you a clue as to why installation failed. In Gord's case, the error was in reference to the path "C:\Windows\System32\Tasks", which is in reference to the Windows Task Scheduler. Ah ha! The light bulb just turned on!

Proceed to the next step.

Dealing with: "Task image is corrupt or has been tampered with" Errors

Now that I knew what the error was about (sort of), my next step was to launch the Task Scheduler to see if I could find any reference to Avast! and it's "Emergency Update" object. To do so: click Start and type in "task scheduler" (no quotes); wait for Task Scheduler to appear in the list and then click it.

As soon as Task Scheduler was launched, I received a number of errors, stating that "Task Avast! settings backup: task image is corrupt or has been tampered with", followed by other similar corruption errors related to Avast!. After looking through Task Scheduler, I found an Avast! folder; I attempted to delete the folder in order to clear the corruption error, but Task Scheduler would not let me. Son of a gun!

To resolve this problem I uninstalled Avast! completely, then went back into Task Scheduler again - only to be greeted with more "ask Avast! settings backup: task image is corrupt or has been tampered with" errors. At this point I searched Google on how to manually remove "task image is corrupt" errors using the Windows Registry, and did just that.

More Errors: The installation failed in the First_Boot phase with an error during Sysprep Operation

After clearing the Task Scheduler error, I attempted to upgrade Gord's Windows 7 computer to Windows 10 once again. This time it failed due to an error which read "oxc1900101 - 0x3001b - The installation failed in the First_Boot phase with an error during Sysprep Operation."

At this point I decided to weigh our losses. Although I was able to get around the first error message, the second error message would have probably taken another hour or two (perhaps more) to resolve. Even so, I wasn't sure if any fixes I would have had to implement would cause further corruption or issues during the Windows 10 installation. Also, because Gord had these errors in the first place, it suggested that his Windows 7 installation was already corrupt. Since he was upgrading from 7 to 10, this would likely mean those errors would have carried over during the upgrade. That is obviously not something we want to do.

Update 20200116: I'm getting a lot of emails from folks asking for help with this problem now that Windows 7 has officially reached its end of life as of January 14, 2020. If you need help with this ASAP, send me an email and don't forget to leave your phone number. I will call you back as soon as possible.

Clean Install Windows 7, 8 and then Upgrade to 10

Rather than continue to down this path, I suggested to Gord that it would be easier to backup his system, format the C drive, reinstall Windows 7 completely new (with Service Pack 1), then run the Windows 10 upgrade, then restore all the user data to the drive from the backup. We did just that and Windows 10 installed without any issues.

So, while I've shed light on how to troubleshoot Windows 10 install failures via the setuperr.log (as cryptic as they are) - it may be easier to simply backup the drive, format it, reinstall Windows, then make the upgrade. For really tough Windows 10 errors, and considering most folks are in a pinch to get to upgrade done as soon as possible (due to the free upgrade deadline on July 29, 2016), reformatting is likely your best bet should you be in the same situation.

Unfortunately, going down this route is a bit of a nightmare for most folks because backing up and re-importing data is never easy if you haven't done it before. Also, file permissions must be applied to the restored files after they are re-imported, otherwise the files won't be accessible or writable. For all intents and purposes, explaining how to go about that is way beyond the scope of the article. In this case, I invite anyone who is facing this issue to please contact me for help, as I can manage the entire thing for you by remote - see below.

Additional 1-on-1 Support: From Dennis

If you have a Windows 10 error that you can't get past or if you need help installing Windows 10, I can help using my remote desktop support service. Simply contact me briefly describing your problem and I will get back to you as soon as possible.

Got a Computer Question or Problem? Ask Dennis!

I need more computer questions. If you have a computer question - or even a computer problem that needs fixing - please email me with your question so that I can write more articles like this one. I can't promise I'll respond to all the messages I receive (depending on the volume), but I'll do my best.

About the author: Dennis Faas is the owner and operator of Infopackets.com. With over 30 years of computing experience, Dennis' areas of expertise are a broad range and include PC hardware, Microsoft Windows, Linux, network administration, and virtualization. Dennis holds a Bachelors degree in Computer Science (1999) and has authored 6 books on the topics of MS Windows and PC Security. If you like the advice you received on this page, please up-vote / Like this page and share it with friends. For technical support inquiries, Dennis can be reached via Live chat online this site using the Zopim Chat service (currently located at the bottom left of the screen); optionally, you can contact Dennis through the website contact form.

Rate this article: 
Average: 4.6 (8 votes)

Comments

billgrossman_7409's picture

I also was unable to upgrade from Windows 7. After 3 attempts (all failures), I went to the Microsoft store. They also were unable to upgrade, so they gave me a FREE Dell Inspiron 5559 Signature Edition. They are advertising this promotion in their store for the month of July. I assume they are trying to entice users to upgrade while it is free. The promotion states that if they cannot upgrade in 1 day you get the free computer. I was the first one to receive it in the Mission Viejo, CA store but on returning to the store learned that there has been others.
Bill

ecash's picture

Some reasons I find when Changing things around...
requirements say nothing about haveing ENOUGH room to move things around.

Any time I do this, I CLEAN EVERYTHING up and out.. I want 30% blank..

Then SOME programs see errors and Fix something on a restart, but the ADDED ext/txt they inserted, does not Errase, or get edited out.. Then windows SEE's it and trys to do it again..