18

I have a system which dual-boots Gentoo Linux and Windows 7 using GRUB2. The computer has four drives, and Windows is installed on the third (last) partition of drive #2. The drive layout looks like this:

|boot|-----------------home-----------------|-------------windows-------------|

(boot and home are Linux partitions) It's an odd setup but it always worked, until I decided to shrink the Windows partition using Gparted. The new layout is:

|boot|-----------------------home-----------------------|-------windows-------|

After making these partition changes, when I select the Windows option in GRUB2 and it hands off control to the Windows bootloader, I get the error message:

Windows Boot Manager  

Windows failed to start. A recent hardware or software change might be the cause. To fix the problem:   1. Insert your Windows installation disc and restart your computer.   2. Choose your language settings, and then click "Next."   3. Click "repair your computer." If you don't have this disc, contact your system administrator or computer manufacturer for assistance.   Status: 0xc0000225   Info: The boot selection failed because a required device is inaccessible.

I'm not particularly surprised that this happens, but I'm wondering if I can fix this without reinstalling Windows.

I've tried booting the computer using the Windows installation DVD (specifically, a Windows 7 upgrade DVD). After I choose the language and keyboard and click "Repair this computer", the System Recovery Options screen doesn't detect my Windows partition. I can click "Next" anyway and then use Startup Repair, which fails to fix the problem, or try command-line tools, namely bootrec (suggested by several websites), sfc, and chkdsk. None of them made a difference; I still get the same error message. (See below for detailed output.)

Also as suggested in similar questions, I tried using the "Rebuild BS" (rebuild boot sector) functionality in TestDisk, running under Linux, acting on the Windows partition. That also did not change the error I get.

I haven't seen any signs of data corruption on either partition, and the drives haven't suffered any physical damage, so it seems fairly certain that the change in partition layout is the cause of this error. I suppose Windows must have the starting sector and/or partition size stored somewhere within its filesystem (the registry?), suggesting that it should in principle be possible to fix this by twiddling a couple bytes in a file somewhere. But which file? Or is there something more complicated?

If it helps, here is the GRUB2 configuration section corresponding to Windows:

menuentry 'Windows 7 (loader) (on /dev/sdb3)' --class windows --class os $menuentry_id_option 'osprober-chain-1F9948EB30A986A0' {
        insmod part_msdos 
        insmod ntfs
        set root='hd1,msdos3'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos3 --hint-efi=hd1,msdos3 --hint-baremetal=ahci1,msdos3  1F9948EB30A986A0
        else
          search --no-floppy --fs-uuid --set=root 1F9948EB30A986A0
        fi
        chainloader +1
}

Again, what I'm looking for is, ideally, a way to fix this without reinstalling Windows. If that's not possible, then reinstallation is an acceptable plan B, but I can handle that myself.


Here's a transcript of my command prompt sessions while booted into the repair environment using the Windows 7 installation DVD. I've removed some blank lines for readability. The following is with all other drives disconnected:

>bootrec /fixmbr
The operation completed successfully,

>bootrec /fixboot
The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrupted.

>bootrec /scanos
Scanning all disks for Windows installations.
Please wait, since this may take a while...
Successfully scanned Windows installations.
Total identified Windows installations: 1
[1]  C:\Windows
The operation completed successfully.

>bootrec /rebuildbcd
Scanning all disks for Windows installations.
Please wait, since this may take a while...
Successfully scanned Windows installations.
Total identified Windows installations: 1
[1]  C:\Windows
Add installation to boot list? Yes(Y)/No(N)/All(A):y
The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrupted.

>sfc /verifyonly /offwindir=C:\Windows /offbootdir=C:\
Beginning system scan.  This process will take some time.
Windows Resource Protection did not find any integrity violations.

>chkdsk C: /F
The type of the file system is NTFS.
Volume label is windows.
CHKDSK is verifying files (stage 1 of 3)...
  313344 file records processed.
File verification completed.
  1684 large file records processed.
  0 bad file records processed.
  2 EA records processed.
  158 reparse records processed.
CHKDSK is verifying indexes (stage 2 of 3)...
  416370 index entries processed.
Index verification completed.
  0 unindexed files scanned.
  0 unindexed files recovered.
CHKDSK is verifying security descriptors (stage 3 of 3)...
  313344 file SDs/SIDs processed.
Security descriptor verification completed.
  51514 data files processed.
CHKDSK is verifying Usn journal...
  35406088 USN bytes processed.
Usn Journal verification completed.
Windows has checked the file system and found no problems.
 207510871 KB total disk space.
 104134880 KB in 251224 files.
    137304 KB in 51514 indexes.
         0 KB in bad sectors.
    423075 KB in use by the system.
     65536 KB occupied by the log file.
 102815612 KB available on disk.
      4096 bytes in each allocation unit.
  51877717 total allocation units on disk.
  25703903 allocation units available on disk.
Failed to transfer logged messages to the event log with status 50.

>diskpart
Microsoft DiskPart version 6.1.7600
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: MININT-P92LVUL
DISKPART>list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          596 GB      0 B
DISKPART>select disk 0
Disk 0 is now the selected disk.
DISKPART>list part
  Partition ###  Type              Size     Offset 
  -------------  ----------------  -------  -------
  Partition 1    Primary             62 MB    31 KB
  Partition 2    Primary            398 GB    62 MB
  Partition 3    Primary            197 GB   398 GB

When I run the same commands with all drives connected, the output is the same, except that diskpart correctly shows all the drives, and the drive letter for the Windows partition in question is D instead of C (because I have an NTFS data partition on drive #1).

I would note that bootrec /fixmbr overwrites the MBR of drive #2, replacing the MBR put there by GRUB2. When I then try to boot from that disk, I simply get the message "Missing operating system" instead of the 0xc0000225 error. I can then boot into Linux and use grub-install to put back the GRUB2 MBR, and then choosing the Windows option in GRUB2 gives 0xc0000225 again.

6
  • Windows cloning often require partition manipulations breaking boot process of Windows - windows won't boot if partition is located in a different position on disk than it was during installation. Would be nice to use your findings :)
    – Basilevs
    Commented Sep 25, 2014 at 3:08
  • 1
    neosmart.net/wiki/0xc0000225
    – smali
    Commented Sep 25, 2014 at 4:33
  • @ali786 well, I'd rather reinstall Windows than spend $20 on a tool to fix the issue. But otherwise that would be an option. (I already looked at that website while preparing this question, though.)
    – David Z
    Commented Sep 25, 2014 at 5:15
  • How about using your installation disk and clicking Upgrade Now instead of performing a clean install? It's kind of a reinstall but you keep your files. Commented Sep 25, 2014 at 5:40
  • 1
    @RsyaStudios The graphical installer doesn't detect my existing Windows installation, so I don't think I can do that.
    – David Z
    Commented Sep 25, 2014 at 5:49

5 Answers 5

12
+400

Depending on the method used, certain things can change in the progress:

The partition details: Use active in diskpart to make the partition activate again.

The boot sector: The bootsect tool can be used to restore the boot sector. (eg. bootsect /nt60 C:)

The partition UUID: By changing the partition position and/or size, the UUID changes; thus the inaccessible UUID stored in the BCD mismatches your partition's UUID. To fix this, remove and rebuild the BCD like this:

bcdedit /export C:\boot\bcd.backup
ren C:\boot\bcd C:\boot\bcd.old
bootrec /rebuildbcd
3
  • This turned out to be the right problem (and solution), but your tip about setting the partition to active was the real key. I needed to make the partition active so that bootrec would know where to write the rebuilt BCD. Perhaps you could add that to the answer? (I didn't have to use bootsect, as it turned out.)
    – David Z
    Commented Oct 2, 2014 at 4:27
  • Updated the answer by embedding my comment; yes, the details of the partition were the missing piece here. Commented Oct 2, 2014 at 19:39
  • "ren C:\boot\bcd C:\boot\bcd.old" gave me an error. Should be "ren C:\boot\bcd bcd.old"
    – user4035
    Commented Jan 23, 2019 at 18:33
3

You might have caused the problem by reducing the Windows partition too much.

Windows has some unmovable files that a third-party product might decide to move. You should in the future use the Windows Disk Manager to resize its partitions, as it will not break the disk. It is also a good idea to first turn off and empty the Recycle Bin, disable the Paging file as well as hibernation, in order to minimize the number of special Windows files, and also run a defragmenter that compacts all files toward the beginning of the disk.

That said, you could do Repair Install to Fix Windows 7. This mild form of installation will fix your currently installed Windows 7 and preserve your user accounts, data, programs, and system drivers. The linked article describes the process in detail with screenshots. You might have to deal afterward with some destruction to the GRUB2 boot sector.

If Repair Install does not work, then Gparted had destroyed your Windows partition. I hope you have backup in this case, as otherwise you might have to resort to Data Recovery Utilities.

21
  • Ah, well that was intentional. I tried using Windows to resize the partition first, after emptying the Recycle Bin and defragmenting (forgot about disabling special files though), but it wasn't able to reduce the partition size as much as I needed it to. I'll try the repair installation and see if it works. If not, then I can mount the Windows partition from Linux and copy any useful files to another partition, so I won't have to resort to data recovery.
    – David Z
    Commented Sep 25, 2014 at 19:32
  • Looking at it now, I see that a repair install can only be done from within Windows, so that doesn't help me.
    – David Z
    Commented Sep 25, 2014 at 20:05
  • You can do that using a Windows 7 SP1 DVD/USB. Details in the above article.
    – harrymc
    Commented Sep 25, 2014 at 20:38
  • 1
    No, I can't. The article explicitly says (multiple times) that you need to be already running Windows to perform a repair install; besides, I tried it, and it won't let me use the Upgrade option when booting from a DVD.
    – David Z
    Commented Sep 25, 2014 at 21:27
  • Does Linux manage to mount the disk, and can you see the file-system and especially drill into the Windows folder and even copy files out of it? Can you boot the Windows DVD into DOS and see the disk? Try also to disconnect any possible device from the computer.
    – harrymc
    Commented Sep 26, 2014 at 6:16
1

I had a similar problem (same error code 0xc0000225) on my computer while I tried to upgrade to Windows 10

The problem came from an empty EFI partition still remaining on one of my drives. On the boot, the computer finds 2 EFI partitions : one from my main OS, and another one corresponding to an old OS I uninstalled months ago (I moved from my first harddrive to SSD and formated everything)

Maybe it's also your problem. I have 2 solutions for you, hope it works :

  • On your control panel, manage your computer, find the useless EFI partition, and delete it
  • Run your computer with the Windows installation support (you can make one by downloading the wizard on microsoft website), run the installation program, advanced settings, and when it presents you all the volumes, find the EFI partition and delete it

I also reinstalled Windows but if you delete the bad EFI partition it will be enough

Since then, no more problem on boot, my computer could install W10, etc...

Sorry if I don't give you the exact names of things you have to click on, my OS is in French ^^

0

Adding an answer here because this is the page that showed for me and the answer that I needed:

0xc0000225 may also be caused by disabling ACPI APIC support in the BIOS (as labeled in this BIOS). I disabled it while fixing suspend issues in Ubuntu, but Windows in this case requires it to be enabled.

This also caused setup cd/usb, recovery to fail with the same error so nothing could be done with Windows until it was enabled.

0xc0000225 happened during Windows 10 Creators update, but not booting back into Windows until after having disabled setting in BIOS so it looked like it was caused from the update but actually wasn't! Tricky!

1
  • Thanks @CmosBattery. Upvoted. Not sure why this was downvoted. This actually got mine to boot when nothing else worked. Boot disk and/or repair disk gave same error. Happened upon this answer and checked AHCI. It was off in BIOS. This was all due to a PSU failure and BIOS reset. Thanks
    – B. Shea
    Commented Mar 21, 2023 at 21:54
0

You need a standard Win10 Install media for repair. Boot up the system with it, and select manual repair / command prompt form install media. Start with diskpart to select manualy the system boot patrtition and assign a drive letter to it, after this rebuild bcdboot on that volume selected, maybe a fixmbr helps too, thats all.

Follow the steps below:

  • Insert media (DVD/USB) in your PC and restart.

  • Boot from the media

  • Select Repair Your Computer

  • Select Troubleshoot

  • Choose Command Prompt from the menu

  • Type in the command:

C:\> Diskpart

DISKPART> list disk
DISKPART> sel disk 0
DISKPART> list volume

At this point you have to select manualy the ~110MB size FAT32 win10 system boot partition, in this example this part has number:99 Choose carefully, because we will overwrite the content of this volume. The boot partition is an about 110MB size partition, and formated with FAT32 filesystem.

DISKPART> sel volume 99 
DISKPART> assign letter=b:
DISKPART> exit

Format the selected partition (Before format you can recheck the content of that partition it should contain only one directory on root with a named EFI.)

C:\> format B: /FS:FAT32

rebuild the boot system on the formated partition

C:\> bcdboot C:\windows /s B: /f UEFI

fix the boot record (in the most of cases it's not necessary, but wont make any mistake it you do it)

C:\> bootrec /fixmbr
C:\> exit

Done.

reboot the system, voila

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .