How to Fix "The Installation Failed in the Safe_OS Phase" in Windows 11

You started upgrading to Windows 11, watched the progress bar climb, and then, somewhere between 30 and 80 percent, everything stopped. A message appeared saying the installation failed in the SAFE_OS phase, and a little while later, your computer rolled back to your previous version of Windows, as if nothing had happened.
This error looks technical and vague, but it has a clear meaning underneath the confusing name. The SAFE_OS phase is a specific stage during Windows Setup where the installer prepares a temporary, minimal version of Windows to safely move your files and settings into the new installation. When something interferes with that process, whether a driver, a setting, or a storage issue, setup cannot continue safely, so it rolls back to protect your existing system.
In this guide, I will explain exactly what is happening during this phase, then walk you through fixing it step by step, starting with the simplest checks, the same way I would if I were troubleshooting this next to you.
Problem Overview
Windows Setup moves through several distinct phases during an installation or upgrade, and SAFE_OS is one of the most sensitive ones. During this phase, Windows boots into a temporary, stripped-down environment to safely migrate your data and drivers into the new installation, before switching over fully.
This phase can fail at a few different specific points, most commonly BOOT, MIGRATE_DATA, or FIRST_BOOT. A failure during BOOT usually points to a driver or firmware issue preventing the temporary environment from starting properly. A failure during MIGRATE_DATA usually points to a problem transferring your files or settings, often related to storage or corrupted data. A failure during FIRST_BOOT usually means the new installation could not start correctly for the first time, often due to driver or hardware compatibility issues.
Because this phase sits so close to the hardware level, drivers, firmware, and storage settings are usually the first places to check when troubleshooting this specific error.
Symptoms
You are likely dealing with a SAFE_OS phase failure if you notice any of the following:
Windows Setup shows the message "The installation failed in the SAFE_OS phase"
The specific stage mentioned is BOOT, MIGRATE_DATA, or FIRST_BOOT
Your computer automatically rolls back to your previous version of Windows
The system restarts in a loop during the installation process
Setup progress stops somewhere between 30 and 80 percent
You see specific error codes such as 0xC1900101, 0x800F0830, or 0x8007001F
A black screen appears briefly during setup before the rollback occurs
Causes
A SAFE_OS phase failure is a symptom. It is not the actual disease. Below are the real causes behind it, starting from the most common.
Outdated or incompatible drivers, especially storage, chipset, and graphics drivers, which can prevent the temporary SAFE_OS environment from starting or functioning correctly.
Corrupted system files on your current Windows installation, which can interfere with the migration process.
Faulty Windows installation media, such as an incomplete download or a corrupted USB drive.
BIOS or UEFI misconfiguration, particularly settings related to boot mode or storage controller mode.
Secure Boot or TPM issues, since Windows 11 specifically requires these features to be properly enabled and configured.
BitLocker encryption, which can interfere with the installation process if it is not suspended beforehand.
Antivirus interference, where third-party security software blocks or interrupts setup files during the sensitive migration phase.
Insufficient disk space, since the SAFE_OS phase needs enough free space to temporarily hold migrated data.
A damaged SSD or HDD, where bad sectors interfere with reading or writing during the data migration step.
Incompatible hardware, particularly older components that do not fully meet Windows 11's requirements.
External USB devices, which can sometimes interfere with the boot process during this sensitive phase.
Important Topics to Understand
Before jumping into fixes, it helps to understand a few basic ideas.
What the SAFE_OS phase actually is: It is a temporary, minimal Windows environment that Windows Setup uses to safely handle the technical work of installing a new version without risking your existing data, before switching over to the finished installation.
Checking hardware compatibility: Windows 11 has stricter hardware requirements than previous versions, particularly around TPM and Secure Boot, and a failure at this stage can sometimes point to a deeper compatibility issue rather than a simple setting.
BIOS and UEFI settings: Many SAFE_OS failures trace back to firmware-level settings, such as storage controller mode or Secure Boot status, which is why checking these settings is one of the most effective troubleshooting steps for this specific error.
Step-by-Step Fix Methods
Before starting, back up your important files, and make sure you know your BitLocker recovery key if your drive is encrypted, since some fixes below involve firmware settings and encryption.
Fix 1: Disconnect External Devices
What it means: Removing all unnecessary USB drives, external hard drives, printers, and other peripherals before attempting setup again.
Why it works: External devices can sometimes interfere with the boot process during the sensitive SAFE_OS phase, causing setup to fail unexpectedly.
How to do it: Unplug everything except your keyboard, mouse, and the installation media itself if you are installing from USB, then restart the installation process.
Expected Result: Setup proceeds past the SAFE_OS phase without interruption from external hardware.
If Fix Fails: Continue to freeing up disk space below.
Fix 2: Free Up Disk Space
What it means: Making sure your main drive has enough free space for the installation to complete.
Why it works: The SAFE_OS phase, especially MIGRATE_DATA, needs enough free space to temporarily hold your files and settings during the transfer, and insufficient space can cause this exact failure.
How to do it: Open Settings, then System, then Storage, and review what is taking up space. Delete unnecessary files, empty the Recycle Bin, and aim for at least 20 to 30GB of free space before attempting the upgrade again.
Expected Result: Your drive shows a healthy amount of free space, and the installation has room to complete the migration step.
If Fix Fails: Continue to disabling antivirus and suspending BitLocker below.
Fix 3: Disable Antivirus and Suspend BitLocker
What it means: Temporarily turning off third-party antivirus software and pausing BitLocker drive encryption before installing.
Why it works: Antivirus software can mistakenly interfere with setup files during the sensitive migration phase, and active BitLocker encryption can block or complicate the installation process.
How to do it: Temporarily disable any third-party antivirus software through its settings. To suspend BitLocker, open Settings, then Privacy and Security, then Device Encryption, or search for Manage BitLocker, and choose Suspend protection.
Expected Result: Setup proceeds without security software interference or encryption-related blocks.
If Fix Fails: Continue to updating BIOS and chipset drivers below.
Fix 4: Update BIOS/UEFI and Chipset/Storage Drivers
What it means: Installing the latest firmware for your motherboard and the latest drivers for your chipset and storage controller.
Why it works: Outdated firmware or storage drivers are one of the most common causes of SAFE_OS failures, particularly during the BOOT stage, since this phase depends heavily on proper hardware communication.
How to do it: Visit your motherboard or laptop manufacturer's official website, download the latest BIOS or UEFI update, and follow their specific instructions carefully. Separately, visit your chipset and storage controller manufacturer's website, such as Intel or AMD, and download the latest chipset and storage drivers.
Expected Result: Setup proceeds past the SAFE_OS phase after the firmware and driver updates are applied.
If Fix Fails: Continue to running SFC, DISM, and CHKDSK below.
Fix 5: Repair System Files and Check Disk Health
What it means: Using built-in Windows tools to repair corrupted system files and check for drive errors before attempting installation again.
Why it works: Corrupted system files or damaged sectors on your drive can interfere with the data migration step, causing exactly this kind of failure.
Command to type:
How to do it: Open Command Prompt as Administrator, type the first command exactly as shown above, press Enter, and wait for it to finish. Then type the second command, press Enter, and wait for it to complete. Then type the third command, press Enter, type Y to schedule the check on the next restart, and restart your computer.
Expected Result: Both scans report no issues, or that repairs were made successfully, and CHKDSK repairs any damaged sectors found.
If Fix Fails: Continue to verifying TPM and Secure Boot settings below.
Fix 6: Verify TPM and Secure Boot Configuration
What it means: Confirming your BIOS or UEFI settings have TPM and Secure Boot properly enabled, as required by Windows 11.
Why it works: Windows 11 specifically checks for these features during setup, and a misconfiguration here can cause the installation to fail during the SAFE_OS phase, even if your hardware technically supports them.
How to do it: Restart your computer and enter BIOS or UEFI settings, usually by pressing a key like F2, F10, Delete, or Esc during startup, depending on your manufacturer. Look for a section related to Security or Trusted Computing, and confirm TPM, sometimes labeled PTT or fTPM, is enabled, along with Secure Boot.
Expected Result: Both settings show as enabled, and setup can properly verify your system meets Windows 11 requirements.
If Fix Fails: Continue to performing a clean boot below.
Fix 7: Perform a Clean Boot Before Upgrading
What it means: Starting Windows with only essential drivers and startup programs running, temporarily disabling everything else.
Why it works: Background programs and services can sometimes interfere with the installation process, and a clean boot removes this possibility before attempting setup again.
How to do it: Press Windows key + R, type msconfig, and press Enter. Go to the Services tab, check Hide all Microsoft services, then click Disable all. Go to the Startup tab, open Task Manager, and disable all startup items. Restart your computer, then attempt the Windows 11 installation again.
Expected Result: Setup proceeds without interference from background programs or services.
If Fix Fails: Continue to recreating your installation media below.
Fix 8: Recreate the Installation USB Using the Latest Official ISO
What it means: Creating a brand new, verified USB installation drive using the most current Windows 11 ISO file directly from Microsoft.
Why it works: Faulty or outdated installation media is a common and often overlooked cause of SAFE_OS failures, and using fresh, official media rules this out entirely.
How to do it: Download the Windows 11 Media Creation Tool or ISO file directly from Microsoft's official website, then use it directly or use a trusted tool like Rufus to create a new bootable USB drive. Use a different USB drive if possible, in case your original one has developed errors.
Expected Result: The new installation media completes the upgrade without triggering the SAFE_OS phase error.
If Fix Fails: Continue to considering a clean installation below.
Fix 9: Perform a Clean Installation Instead of an Upgrade
What it means: Installing Windows 11 fresh, rather than upgrading in place over your existing Windows installation.
Why it works: An in-place upgrade carries over existing drivers, settings, and potential corruption from your old installation, while a clean installation starts completely fresh, avoiding whatever specific conflict was causing the SAFE_OS failure.
How to do it: After backing up all important files, boot from your Windows 11 installation USB, choose Custom Install, and select your main drive to install a completely fresh copy of Windows 11.
Expected Result: The clean installation completes successfully, without the SAFE_OS phase error appearing.
If Fix Fails: If a clean installation still fails at the same phase, the issue is very likely a deeper hardware compatibility or firmware problem that may need professional diagnosis.
Advanced Fixes
Check official hardware compatibility. Visit Microsoft's official Windows 11 requirements page and confirm your processor, TPM version, and Secure Boot support are all officially compatible, since some older systems technically run Windows 11 unofficially but fail during sensitive phases like SAFE_OS.
Try switching storage controller mode carefully. In BIOS or UEFI, some systems offer a choice between AHCI and RAID modes for storage controllers. If your system uses RAID mode and you do not specifically need it, switching to AHCI, with caution and proper research for your specific system, has resolved SAFE_OS failures for some users.
Remove recently added or unusual hardware temporarily. If you recently added new internal hardware, such as a second drive or a new expansion card, temporarily removing it before attempting installation can help isolate whether it is contributing to the failure.
Check Windows Update history for related patches. Microsoft periodically releases fixes for known SAFE_OS phase issues tied to specific driver versions, so checking for recent updates related to your specific error code can sometimes reveal an official, targeted fix.
Prevention Tips
Keep your BIOS or UEFI firmware and chipset drivers updated regularly, especially before attempting a major Windows upgrade.
Always download Windows 11 ISO files and the Media Creation Tool directly from Microsoft's official website.
Suspend BitLocker before starting any major Windows upgrade, and remember to re-enable it afterward.
Keep at least 20 to 30GB of free disk space available before starting the installation.
Disconnect unnecessary external devices before beginning any Windows installation or upgrade.
Check your system against Microsoft's official Windows 11 hardware requirements before attempting an upgrade, especially on older computers.
Windows Cannot Be Installed to This Disk": Fixing GPT and MBR Partition Errors
How to Fix Windows Install Error 0x80070002 (Corrupted Files Solution)
Fix Windows 11 Installation Error 0x80070005 (Access Denied)
Windows Blue Screen Error (BSOD): Causes and Step-by-Step Fixes
Frequently Asked Questions
What does "SAFE_OS phase" mean in Windows Setup?
It refers to a temporary, minimal Windows environment that Setup uses to safely migrate your files, settings, and drivers into the new installation before switching over completely.
Why does Windows 11 installation fail during the SAFE_OS phase?
The most common causes are outdated drivers, firmware issues, corrupted system files, insufficient disk space, faulty installation media, or TPM and Secure Boot misconfiguration.
Can outdated drivers cause the SAFE_OS phase error?
Yes. Outdated or incompatible drivers, especially storage, chipset, and graphics drivers, are one of the most common causes of this specific failure.
Should I disable BitLocker before upgrading?
Yes. Suspending BitLocker before a major Windows upgrade is recommended, since active encryption can interfere with the installation process. Remember to re-enable it once the upgrade completes.
Is a clean installation better than an in-place upgrade for this error?
If an in-place upgrade keeps failing at the SAFE_OS phase after trying other fixes, a clean installation often resolves it, since it avoids carrying over potential corruption or conflicts from your existing installation.