Wednesday, March 19, 2014

Windows 7, UEFI, and Boot Error 0xc0000225

Back in February, the motherboard failed on my laptop and took the hard drive with it. I sent it in for repair, and when it returned I immediately set about removing that crapware Windows 8 and replacing it with Windows 7 Pro.

For the next week, I must have installed Win7 half a dozen times. It would install successfully every time. I could download and apply all the updates. But eventually it would encounter a boot error. Something like this:

Boot Manager:
Windows failed to start. A recent hardware of software change might be the cause. To fix the problem:

1.Insert your Windows installation disc and restart the computer.
2.Choose your language settings, and then click "Next".
3.Click "Repair your computer."

If you do not have this disc, contact your system administrator or computer manufacturer for assistance.

Status: 0xc0000255
I searched the internet. I found a lot of information about rebuilding the boot record. Nothing worked. I tried converting the whole disk to an MBR disk. No joy.

Then I hit on the solution.

I converted the disk back to a GPT disk and performed a clean operation. This completely wiped the drive of all partition information. I ran the installer again, and let the installer create the necessary boot partitions. I defined my OS and Data partitions.

It turns out that when I was massaging the partitions that were on the disk when it came back from ASUS, I deleted one of the required partitions. For whatever reason, the OS would start successfully for a while without this partition, but eventually it would fail spectacularly.

So the solution seems to be:

  1. Boot to your install disk.
  2. At the language selection screen, press Shift+F10 to get a terminal.
  3. Enter diskpart and press Enter.
  4. list disks to display a list of the disks on the system. 
  5. Select the appropriate disk drive with the sel disk command. (Ex.: sel disk 0)
  6. Enter convert gpt and press Enter. (I assume if you want to use MBR that it would be fine, just use the convert mbr command.)
  7. Enter clean and press Enter.
  8. Reboot to the install disk and install as normal. The installer's partition manager will handle creating the necessary boot partitions.
So if you have this issue, there is a fair chance that you have gunked up the required partions.