0XC000025F

STATUS_UNSUPPORTED_COMPRESSION (0xC000025F): Fix Windows Boot Error

Your PC won't boot because Windows can't read the compressed filesystem. This usually happens after a ghost image or a botched compact OS tweak. Fix it by booting WinRE and decompressing the image.

Quick answer

Boot into Windows Recovery Environment, run compact /u /exe /s:C:\ on the affected volume, then bootrec /fixboot and bootrec /rebuildbcd. Reboot.

Why you're seeing 0xC000025F

Windows loads the boot files from a compressed NTFS volume. During startup, the kernel reads the system image and decompresses it on the fly. If that image was compressed with an algorithm the running kernel doesn't understand — or the volume was compacted with a utility that wrote metadata the kernel can't parse — the boot manager gives up and throws STATUS_UNSUPPORTED_COMPRESSION (0xC000025F) before you ever see the login screen.

I've seen this most often in three situations. First, someone restored a Ghost or Acronis image made on a different machine and the image used XPRESS4K compression while the target system only supports XPRESS8K or LZX. Second, a sysadmin ran compact /c /s:C:\Windows to save space on a small SSD and the kernel files got compressed with a format the bootloader can't read. Third, a failed DISM operation wrote a compressed WIM into a location the boot chain expects to be raw. All three end the same way: black screen, error code, no way in.

The error can also appear on virtual machines when the host passes through a compressed VHD or when you mount a WIM as a boot volume without converting it first. Hyper-V Gen 2 VMs are particularly fussy about this.

Fix it step by step

You'll need a Windows install USB or the recovery partition. If you don't have one, make one now on another PC using the Media Creation Tool. The steps below assume your Windows volume is C: in recovery. It usually isn't — check with diskpart first.

  1. Boot into WinRE. Hold Shift while clicking Restart from the login screen, or boot from your USB and pick Repair your computer. You should land on the Choose an option screen.

  2. Open a command prompt. Click Troubleshoot, then Advanced options, then Command Prompt. You'll see X:\Sources> as the prompt. That's the recovery environment, not your Windows drive.

  3. Find your Windows volume. Run:

    diskpart
    list volume
    exit

    Look for the volume with the largest size that isn't labeled System Reserved or EFI. Note the drive letter. On UEFI systems, your Windows drive might be D: or E: inside WinRE. I've seen it come up as F: more than once.

  4. Test that it's really your Windows drive. Run dir D:\Windows\System32\ntoskrnl.exe (swap D: for your letter). If you get "File Not Found," try the next letter. Don't skip this — writing to the wrong volume is how people lose data.

  5. Decompress the boot-critical files. Run:

    compact /u /exe /s:D:\Windows\System32\ntoskrnl.exe
    compact /u /exe /s:D:\Windows\System32\winload.exe
    compact /u /exe /s:D:\Windows\System32\winresume.exe
    compact /u /exe /s:D:\Windows\Boot

    Each command should print "1 file were uncompressed" or similar. If it says "0 files," that file wasn't compressed and you can move on.

  6. Remove compression from the whole Windows folder if the above didn't catch it. This takes a while — on a 500 GB SSD expect 15-20 minutes:

    compact /u /exe /s:D:\Windows
  7. Rebuild the boot configuration. Run these three in order:

    bootrec /fixmbr
    bootrec /fixboot
    bootrec /rebuildbcd

    If fixboot returns "Access is denied," you're on an EFI system and need to mount the EFI partition first. See the alternative fix below.

  8. Check the BCD entry points at the right volume. Run bcdedit /enum. The device and osdevice lines should both point to your Windows volume, like partition=D:. If they point somewhere else, fix them:

    bcdedit /set {default} device partition=D:
    bcdedit /set {default} osdevice partition=D:
  9. Reboot. Type exit to close the prompt, then click Continue or restart. You should see the Windows logo next instead of the error.

If that didn't work

EFI partition is hiding the fix

On UEFI systems, bootrec /fixboot fails because the EFI System Partition (ESP) is FAT32 and not assigned a drive letter. Mount it manually:

diskpart
list disk
select disk 0
list partition
select partition 1
exit

Pick the partition labeled System or EFI, usually 100-500 MB. Assign it a letter:

diskpart
select disk 0
select partition 1
assign letter=S
exit

Now recreate the boot files:

bcdboot D:\Windows /s S: /f UEFI

You should see "Boot files successfully created." Remove the letter with diskpart and remove letter=S before rebooting.

You restored a Ghost or third-party image

Ghost uses its own compression that modern Windows bootloaders won't read. Convert the image with wimlib-imagex on a working machine:

wimlib-imagex apply image.gho D:\ /check

Or use the older Ghost Explorer to extract, then reapply with DISM. The real fix is to stop using Ghost. It hasn't been maintained since 2013 and it produces images that break on any Windows 10 or 11 system with Secure Boot enabled.

DISM wrote a compressed WIM into the boot path

If you ran dism /export-image and accidentally targeted the system volume, the boot chain can't read it. Boot WinRE and run:

dism /image:D:\ /cleanup-image /restorehealth /source:E:\sources\install.wim

Swap E: for wherever your install media is mounted. This replaces the broken files with fresh uncompressed ones from the WIM.

Preventing this next time

Don't run compact /c on C:\Windows or C:\Windows\System32. The space savings on modern SSDs aren't worth the risk — you're talking maybe 2-3 GB on a 500 GB drive. If you're desperate for space, use Storage Sense or delete the WinSxS folder with DISM, both of which are safe. And if you're deploying images, use DISM with /compress:recovery for WIMs, not the old LZX or XPRESS formats that only newer kernels read. Test your image on the same Windows build you'll deploy to before rolling it out. I've watched a 200-machine rollout fail at hour three because someone imaged on Windows 10 21H2 and deployed to 22H2 machines — the compression format changed mid-cycle and nothing booted.

Bottom line: 0xC000025F almost always means somebody compressed files the bootloader can't read. Decompress them from WinRE, rebuild the BCD, and stop using compact on system folders.
Related Errors in Windows Errors
0X000020DB Fix ERROR_DS_MISSING_EXPECTED_ATT (0x000020DB) 0X00000432 ERROR_ALREADY_RUNNING_LKG 0X00000432 Fix 0X000036BD Fixing SXS Unknown Encoding 0x36BD in Windows 0X0000209C Active Directory name too long (0x0000209C) fix

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.