Windows Vista / Windows 7 / Server 2008 R2: 0xc0000225 after resizing partition or restoring backup

So I needed to shrink a C: partition of a Windows 7 (Server 2008 R2) machine.  After shrinking with Gparted (my open-source partitioning tool of choice), Windows no longer booted, with the boot manager complaining of 0xc0000225 (awesome error message as usual, Microsoft).

To get things working again, it was necessary to execute the following BCDedit.exe commands from a rescue disk (WinPE worked fine for me):

bcdedit /set {bootmgr} device boot
bcdedit /set {default} device boot
bcdedit /set {default} osdevice boot

After that, life is again normal.

Sometimes you might need to completely reinstall the MBR — for example, you restored only the c:\ partition from backup to a new already-partitioned disk, but did not restore the original partition table and MBR. This can be accomplished as following:

bootsect /nt60 SYS /mbr

In some cases, you may also need to make sure the boot partition is flagged ‘bootable’ or any of the above commands fail. To correct it:

DISKPART (to open the partition utility)
LIST DISK (disk number(s) will be shown)
SELECT DISK n (where n is the number of the disk - probably 0)
LIST PARTITION (partition number(s) will be shown)
SELECT PARTITION n (where n is the number of the Primary partition you wish to make Active)
ACTIVE (the selected partition on the selected disk will be made Active)

6 Responses to Windows Vista / Windows 7 / Server 2008 R2: 0xc0000225 after resizing partition or restoring backup

  1. Andycar says:

    Thank you!
    I’ve search all the Internet on this 0xc0000225 error after partition resize.

    And it’s only your tip that actually worked!

  2. Randy says:

    Glad it worked out for you! Believe me I was very frustrated before I figured this out.

  3. Typical unhelpful error code, hopefully you solved this problem, if not have a look at this threadpartition ideas.

  4. Anonymus says:

    Hey Randy,

    Thank you very much for sharing these commands… They finally solved my problem 😉
    Feels soooooo gooooooood 🙂

  5. 3m4nu says:

    Found this page and solved the same problem on a resized windows 8 partition in 10 seconds, without having to search here and there. THANKS

  6. Rene says:

    Flippin excellent, thanks buddy