Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Recently I have used Bootcamp to install Windows 7 Professional (64bit) on my Mac Book Air 3,2. I didn't have a CD/DVD so I used ISO and USB.

This is how I did it:

  1. Use VirtualBox to install the Windows ISO
  2. Use the Virtual Windows to copy the ISO contents onto a 8GB USB and its boot information. (bootsect.exe) (Guide here)
  3. Use Daemon Tools to trick BootCamp 5.0 to partition the disk.
  4. Install rEFIt and used it to boot into the Windows Installation USB that I created earlier using VirtualBox.
  5. Install Windows, then manually install all Apple BootCamp Support Drivers.

Then, I realized that I had given too little space to Windows. So, I did this:

  1. Shrink the Mac partition.
  2. Boot into Windows 7.
  3. Use Windows 7 to expand the partition to take up the unallocated space.

Now, Windows crashes on startup with the error that it can't find a bootable device. So, I used rEFIt's Partitioning Tool to repair the MBR.

So far, so good. Then comes the problem.

When booting, Boot Manager crashed with status code 0xc0000225 and it told me to use the installation disc to repair the computer (as said so in an online guide, too [I can't find it, sorry])

I inserted the USB that I created earlier with VirtualBox containing the ISO contents and the boot information and restarted the Mac and into rEFIt.

I selected boot Partition 1 (which is Partition 1 for the USB, /dev/disk1) but instead of booting into the Installation, it booted into my internal Windows OS (which crashes, of course, because its the screwed up installation)

So now I can't boot into the Installation USB (selecting the USB or Windows boots into the same thing) and I need to do it to repair the system!

How should I boot into the USB?

Thanks in advance!

Edit:
I have tried using the Windows USB tool, however it still dosen't work.

Edit 2:
Tried using rEFIne, also couldn't work. Now trying CD (if I can get one) and editing BIOS values.

share|improve this question
    
Anyone has a solution? –  ihsoy ih Apr 4 '13 at 14:36
add comment

1 Answer

up vote 2 down vote accepted

You've trashed your partition table. Here's how:

  1. Windows/OS X dual-boot setups almost always use a hybrid MBR, which is a dangerous (as you've discovered) hack that involves copying up to three entries from the GUID Partition Table (GPT) into a Master Boot Record (MBR) partition table. This creates the opportunity for the GPT and MBR data to go out of sync.
  2. When you resized your Mac partition (presumably in OS X), the Mac tool adjusted the GPT side, and probably also the MBR side. So far so good.
  3. When you resized your Windows partition in Windows, you adjusted the MBR side without touching the GPT data. Since the GPT is the real partition table, this means that your partition table was now damaged, although not irreparably.
  4. When you used gptsync from rEFIt, it created a fresh hybrid MBR, basing it off of the GPT data. Since the MBR data contained the only accurate record of your Windows partition, this effectively trashed that partition.

How bad this is depends on precisely how you resized your partitions. If your Windows partition was first on the disk, it might be relatively easy to recover the situation, since you should now have a Windows partition definition with the correct start point but an incorrect end point. This might be relatively easy for some utilities to recover; however, given your symptoms and the usual way these things are laid out on Macs, my suspicion is that your Windows installation came after your OS X installation. In that case, when you resized Windows, you moved its start point. If this is what happened, then the steps you took mean that the new Windows partition start point is now lost.

In either case, your best hope of recovery is to use a tool like TestDisk, which is a tool for identifying "lost" filesystems. If this recovery is successful, you'll end up with a correct GPT holding all your partitions, including your resized Windows partition. You'll then be able to use gptsync to create a fresh hybrid MBR, and with any luck Windows will start booting again. Ironically, you may need to delete what appears to be your Windows partition for the recovery to succeed. (I recommend using gdisk for this task, since I can guarantee that it won't touch what's inside the partition. I'm not sure what Disk Utility does when it deletes partitions.) Note that the TestDisk recovery procedure is not 100% risk-free, though, so I strongly recommend you create a complete backup of your OS X installation before proceeding. If this fails, you could try looking for another tool that does the same job; it's conceivable that one tool will work when another doesn't. If you can't recover in this way, you'll just have to re-install Windows from scratch.

In the future, remember rule #1 when dealing with hybrid MBRs:

ALWAYS MODIFY PARTITIONS WITH GPT-AWARE TOOLS!

Using the GPT-unaware tools in Windows to resize the Windows partition is what got you into trouble, although gptsync's blind acceptance of the GPT data in the face of conflicting MBR data also exacerbated the problem.

You can also thank Apple for this problem; they're the ones who pushed hybrid MBRs on their customers, despite the fact that they violate the GPT specification and are an accident waiting to happen. (You're far from the first person to be bitten by this problem!)

share|improve this answer
    
Thanks for replying after so long a time. I had reinstalled my system and everything works fine now. Thanks a bunch! FYI Windows was on the right of the unallocated space. –  ihsoy ih Apr 7 '13 at 15:04
    
But I have a question. Why couldn't my Mac boot into my USB? –  ihsoy ih Apr 7 '13 at 15:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.