Fix 0X00002172: SAM init failure during Windows boot
Your PC hits this blue screen when the SAM registry hive is corrupt or missing. It usually happens after a failed update or disk corruption. Let's get it sorted.
When this error shows up
You're trying to boot Windows 10 or 11 and you get a blue screen with 0X00002172 and a message about ERROR_DS_SAM_INIT_FAILURE_CONSOLE. The exact text says "SAM initialization failed because of the following error: %1". This typically hits after a failed feature update (like the 22H2 update) or if your drive had a sudden power loss during a write operation. I've seen it most often on Dell OptiPlex 7080s and Lenovo ThinkPads after a botched BIOS update.
What's actually going on
The SAM (Security Account Manager) registry hive is a file at C:\Windows\System32\config\SAM. It stores your local user account hashes and security policies. When Windows boots, the Session Manager (smss.exe) tries to load this hive. If the file is corrupted—maybe a bad sector, a partial write, or a botched registry backup—the boot stops dead with this error. The SAM hive is small but critical. Corruption here isn't subtle; it's a hard stop.
The root cause is almost always a corrupt hive file. Rarely, it's a failing hard drive. I'd bet on the hive being the culprit 9 times out of 10.
Fix: Restore the SAM hive from the RegBack folder
Windows keeps automatic backups of the registry hives in C:\Windows\System32\config\RegBack. Those backups are your best bet. Here's the step-by-step using the Windows Recovery Environment (WinRE).
Step 1: Boot into WinRE
- Turn on your PC and as soon as you see the Windows logo, hold the power button to force shut down. Do this three times.
- On the fourth boot, Windows should show the "Automatic Repair" screen. Click Advanced options.
- Then go to Troubleshoot > Advanced options > Command Prompt.
If you have a Windows installation USB, boot from that and press Shift+F10 at the setup screen to get a command prompt directly.
Step 2: Identify your Windows drive
At the command prompt, type:
diskpartlist volumeLook for a volume labeled Windows or the one with the largest size (typically D: or C: in recovery). Note the drive letter. I'll assume it's D: for this guide.
exitStep 3: Backup the corrupt hive and restore from RegBack
cd /d D:\Windows\System32\configren SAM SAM.oldcopy D:\Windows\System32\config\RegBack\SAM D:\Windows\System32\config\SAMIf the RegBack\SAM file is missing or empty (size 0), you've got a bigger problem. Try an older backup or check the next section.
Step 4: Test the fix
Type exit to close the command prompt, then choose Continue to restart. If Windows boots past the blue screen, you're golden.
If that didn't work: Check for disk errors
Sometimes the hive isn't the problem—the disk is going bad. Still in WinRE command prompt, run:
chkdsk D: /f /rThis takes a while (30–60 minutes on a 500GB SSD). Let it finish. Bad sectors can corrupt the SAM hive mid-read. After chkdsk, repeat the RegBack restore steps above.
If chkdsk finds tons of bad sectors, replace that drive. No software fix fixes dying hardware.
Last resort: Use a restore point
If the RegBack method didn't help and chkdsk didn't flag the drive, try System Restore from WinRE:
- Go to Troubleshoot > Advanced options > System Restore.
- Choose a restore point from before the error started.
System Restore backs up the registry before applying changes, so it can revert the SAM hive to a known-good state.
If it still fails after all this
You're looking at a fresh Windows install. Back up your data first—use a Linux live USB or a WinPE environment to copy files off the Users folder. Then do a clean install using the Windows Media Creation Tool. Once you're back up, restore from your backup. I know this isn't the news you wanted, but sometimes the hive is too far gone.
One more thing: after you get Windows running again, make sure your BIOS is up to date and you've disabled any unstable overclocking. I've seen marginal RAM timings cause registry writes to go sideways.
Was this solution helpful?