Windows 8 won't boot after rewriting partition table

3

I was recovering a deleted partition using Testdisk to rewrite the partition table. However after that, windows 8 refused to boot up. On boot, I am presented with an blue screen saying that there was an error code 0xc0000225, and F8 doesn't do anything after that.

I attempted to fix the problem using startup repair from a windows installation cd, but that failed to fix the problem. I also tried using these commands in the console:

bootrec /scanos
bootrec /rebuildbcd
bootrec /fixmbr
bootrec /fixboot

However this also did not solve the problem.

The problem also stops me from booting up the recovery partition, giving the same error as above.

GRUB has also been screwed, and it now says

error: invalid filesystem

and starts a grub rescue prompt.

Fortunately rEFInd still works which allows me to boot into my Mint system. The windows bootloader does not work when run from rEFInd

Running boot-repair does not fix the problem.

I also tried setting the boot flag on my windows OS partition.

Rewriting the partition table also cleared the boot options from the BIOS, and I had to manually add them back in.

I'm not 100% sure what the original partition table type was. Testdisk defaulted to EFI/GPT so that's what I went with.

The partition that was deleted was one of the linux partitions. It was recovered nicely.

The windows partitions seem to be okay, seeing as how I can still access them from Mint.

The current partition structure looks something like this:

P MS Data                     2048     206847     204800 [SYSTEM]
  FAT32, 104 MB / 100 MiB
P MS Data                   206848    2050047    1843200 [Recovery]
  NTFS, 943 MB / 900 MiB
P MS Data                  2312192  783003647  780691456 [OS]
  NTFS, 399 GB / 372 GiB
P MS Data                783003648  783720447     716800
 NTFS, 367 MB / 350 MiB
P MS Data                783720448 1645320191  861599744 [DATA]
  NTFS, 441 GB / 410 GiB
P MS Data               1645320192 1703913471   58593280
  EXT4 Large file Sparse superblock Recover, 29 GB / 27 GiB
P Linux Swap            1703913472 1719537647   15624176
  SWAP2 version 1, 7999 MB / 7628 MiB
P MS Data               1719537664 1911560191  192022528
  EXT4 Large file Sparse superblock Recover, 98 GB / 91 GiB
P MS Data               1911560192 1953523711   41963520 [Restore]
  NTFS, 21 GB / 20 GiB

The second ext4 partition was the one I recovered.

I can probably fix the issue with grub by refreshing it but I left it alone for now to help diagnose the problem.

This is really quite baffling.

EDIT: I suspect that perhaps the partition table is the wrong type, maybe it is supposed to be MBR or hybrid.

linux
windows-8
boot
partitioning
grub
asked on Super User Feb 2, 2014 by Jonathan • edited Feb 2, 2014 by Jonathan

1 Answer

1

Ok I finally solved it. Apparently Windows 8 needs this Microsoft System Reserved partition just before the OS partition. This partition is not recognized by testdisk and got deleted. I had no idea it was even there. This also caused some problems with grub presumably because the number of partitions got changed.

I recreated the MSR partition by booting up a windows rescue disk, and using the following commands in the command prompt.

diskpart
create partition msr

Note that this only works fine because the space where my MSR used to be was the only unallocated space on the disk. If your disk is partitioned differently you might want to refer to the documentation.

I also discovered that setting the boot flag on the Windows OS partition also prevents windows from booting. I put the boot flag on the SYSTEM partition instead.

answered on Super User Feb 5, 2014 by Jonathan

User contributions licensed under CC BY-SA 3.0