Fix it now
Setup was running offline in the SafeOS phase, installing drivers into the new image, and one of them failed. Microsoft’s own wording for the companion code is blunt about it: an incompatible device driver is present. The fastest route through is to stop setup migrating your drivers at all.
setup.exe /auto upgrade /migratedrivers none
pnputil /enum-drivers
/migratedriverstakes All or None. With None, setup installs only the drivers that ship in the new image, and your vendor drivers are reinstalled afterwards.- If you would rather remove the culprit than skip them all, run
pnputil /enum-driversand note anything from a storage, graphics, network or peripheral vendor. - Remove a candidate with
pnputil /delete-driver oem##.inf /uninstall, using the published name from the enumeration output. - Disconnect every device that is not needed to run the upgrade: docks, card readers, external drives, printers, capture devices.
- Repair the component store before retrying if the machine has any history of update failures:
DISM /Online /Cleanup-Image /RestoreHealth, thensfc /scannow.
Plan to reinstall graphics, storage and network drivers after an upgrade run with /migratedrivers none, and have them downloaded before you start.
If the upgrade completes you can stop here. If not, the next section explains what SafeOS actually is and why a driver that works today can fail there.
Why it happens
An in-place upgrade runs part of its work outside Windows. The SafeOS phase boots a minimal environment from the media, and in that environment setup applies the new image and installs drivers into it. The machine is not running your Windows at this point, which is the important part: the drivers being installed are being installed cold, into an image, without the software they normally sit alongside.
That is why a driver can work perfectly every day and still fail here. It may depend on a service that is not running, on a filter that is not loaded, or on a registry state that exists only in the installed system. The extend code 0x20007 marks the failure as happening during driver installation in that phase, and the front half of the code says how it failed.
Microsoft publishes three of the four pairs directly. 0x80004005 – 0x20007 is an unspecified error with a driver during the SafeOS phase. 0x80070003 – 0x20007 is a failure during SafeOS phase driver installation, and 0x80070003 on its own is Win32 3, ERROR_PATH_NOT_FOUND. 0x80070490 – 0x20007 is the one with the clearest wording: an incompatible device driver is present.
0x8007001F – 0x20006 is the odd one out. Microsoft publishes 0x8007001F paired with 0x3000D and with 0x4000D, but not with 0x20006. 0x8007001F is Win32 31, ERROR_GEN_FAILURE, a device attached to the system is not functioning, and the extend code decodes from the published tables as phase 2 SafeOS, operation 6 REPLICATE_OC. Since that specific pair is not in Microsoft’s table, treat the decode as a decode rather than as a published meaning.
A third-party driver cannot install into the new image
You have this one if Any of the 0x20007 pairs, on a machine with vendor storage, graphics or peripheral drivers.
- Run the upgrade with
setup.exe /auto upgrade /migratedrivers noneso nothing of yours is carried over. - Let it complete, then reinstall vendor drivers from current downloads.
- If you would rather be surgical, use
pnputil /enum-driversto find candidates andpnputil /delete-driver oem##.inf /uninstallto remove them first.
Removing a storage driver on a machine that needs it to see its own disk is the one case where you should skip the driver and use /migratedrivers none instead.
Hardware attached to the machine is the thing that fails
You have this one if 0x8007001F – 0x20006, which decodes to a general failure and a device not functioning.
- Disconnect everything that is not the keyboard, mouse and display, including docks and hubs.
- Retry the upgrade with the machine as bare as you can make it.
- If it succeeds, reattach devices one at a time afterwards to find the one that was at fault.
The component store is damaged, so servicing fails wherever it is asked to work
You have this one if The failure moves around between attempts, and the machine has a history of updates failing too.
- Run
DISM /Online /Cleanup-Image /ScanHealthand read what it says before repairing. - Run
DISM /Online /Cleanup-Image /RestoreHealth, with an explicit/Sourceif it cannot fetch what it needs. - Follow with
sfc /scannow, then retry the upgrade.
Security software is intercepting the offline phase
You have this one if The failure is consistent, the drivers are unremarkable, and the machine runs a third-party endpoint product.
- Uninstall the product for the duration of the upgrade. Disabling it leaves its drivers loaded.
- Retry the upgrade and let it run through without interruption.
- Reinstall the product afterwards from a current installer rather than from the version you removed.
Full reference
The phase and operation codes, and what they buy you
Every one of these codes is a pair. The first half is an ordinary Windows error and the second half says where setup was when it happened. Learning to split them is the single most useful habit for upgrade failures, because it turns a search for the whole string into two much more productive questions: what does this error mean, and what was setup doing.
| Extend code | Where setup was |
|---|---|
0x20007 |
Driver installation during the SafeOS phase |
0x20006 |
The SafeOS phase, at the operation that replicates optional components |
0x20009 |
Partition analysis and validation |
0x3000D |
The first boot phase, during data migration |
0x4000D |
The second boot phase, during data migration |
Driver commands worth knowing
| Command | What it does |
|---|---|
pnputil /enum-drivers |
Lists every third-party driver package in the driver store with its published name |
pnputil /delete-driver <oem#.inf> |
Removes a driver package from the store |
pnputil /delete-driver <oem#.inf> /uninstall |
Removes the package and uninstalls it from any device using it |
setup.exe /auto upgrade /migratedrivers none |
Runs the upgrade without carrying your drivers into the new build |
setup.exe /auto upgrade /migratedrivers all |
The other value the switch takes, which is the default behaviour |
Do not remove a storage controller driver the machine needs to see its own boot disk. If you are unsure whether a driver is load-bearing, use /migratedrivers none instead, which sidesteps the question entirely.
Reading the logs from the offline phase
$Windows.~BT\Sources\Pantherholds the logs from before the machine restarts into the new build. Searchsetupact.logfor the code and read upwards.setuperr.login the same folder is the shorter list of errors only, which is often quicker to start with.- SetupDiag reads both and matches them against published rules, which turns a log hunt into a named finding when a rule applies.
- Driver-specific detail appears in
setupapi.dev.logonce the machine is back in Windows, and it names the INF that failed.
Getting the drivers back afterwards
An upgrade run with /migratedrivers none finishes with whatever drivers the new image ships, which is enough to boot, display and usually network, but not enough to be finished. Reinstall graphics, chipset, storage and network drivers from the machine vendor’s current downloads rather than from an installer saved before the upgrade, since the point of the exercise was to stop carrying old driver packages forward.
Do that before you reconnect docks and peripherals, so that when something misbehaves you know whether it is the device or the driver you have just installed.
When a licence is the actual fix
No licence fixes a driver failure, and any advice to buy one to clear a 0x20007 code is wrong. The commands here cost nothing and they resolve the great majority of these. A licence becomes relevant only when the machine’s driver situation is genuinely unsalvageable and a clean install of a supported build is the pragmatic answer, at which point you need media and an entitlement for the edition you are installing. Arco supplies Windows 11 Pro upgrade licences for that case, and will check whether your current entitlement already covers the rebuild first.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0x80004005 - 0x20007 |
An unspecified error occurred with a driver during the SafeOS phase | Microsoft Learn |
0x80070003 - 0x20007 |
A failure during SafeOS phase driver installation. 0x80070003 is Win32 3 ERROR_PATH_NOT_FOUND | Microsoft Learn |
0x8007001F - 0x20006 |
Not published as a pair by Microsoft. 0x8007001F is Win32 31 ERROR_GEN_FAILURE and the extend code decodes as SafeOS, replicate optional components | not published by the vendor |
0x80070490 - 0x20007 |
An incompatible device driver is present | Microsoft Learn |
Confirm the fix worked
- The machine boots into the new build and
winverreports the version you were installing. - Device Manager shows no devices with a warning marker, once you have reinstalled vendor drivers.
pnputil /enum-driversno longer lists the driver package you removed.- A cumulative update installs cleanly, which confirms servicing is healthy on the new build.
Questions people ask about this
What is the SafeOS phase?
It is the part of the upgrade that runs outside your Windows, in a minimal environment booted from the media. Setup uses it to apply the new image and install drivers into it. Because your Windows is not running, drivers are installed without the services, filters and registry state they normally depend on, which is why one that works every day can still fail there.
Is /migratedrivers none safe?
Yes, and it is the fastest way past this family of failures. The cost is that you finish with only the drivers in the new image, so plan to reinstall graphics, chipset, storage and network drivers afterwards. Download them before you start, because a machine on generic network drivers may not be able to fetch them for you.
How do I know which driver is the problem?
Read setupapi.dev.log after the rollback, which names the INF that failed, and cross-reference it with the pnputil enumeration. If the log is inconclusive, the practical approach is to skip driver migration entirely rather than to guess, because a wrong guess costs another failed upgrade and an hour.
Why does 0x8007001F – 0x20006 not appear in Microsoft’s table?
Because Microsoft publishes 0x8007001F with other extend codes but not with that one. The parts are documented separately, so the pair can be decoded, but a decode is not the same as a published meaning and this article does not pretend otherwise. Treat it as a general device failure during the offline phase and diagnose it by disconnecting hardware.
