You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I run Win7 Startup Repair from USB to repair Bootcamp installation?

I messed up my bootcamp partition after resizing the OSX partition to give it more space so I found this fix - http://mourougan.com/2013/06/22/repairing-boot-camp-after-creating-new-partition /


The fix worked in that the windows partition now shows up on startup manager but when I try to load it the 'missing operating system' error message shows.

So I need to run Startup Repair from USB but when I try that from startup manager it just gives a black screen and blinking cursor, nothing happens from there...

Can anyone help with getting startup repair to load? any advice greatly appreciated.

Many Thanks

Mac mini (Late 2012), OS X Yosemite (10.10.1)

Posted on Jan 19, 2015 4:28 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 19, 2015 12:37 PM

The NTFS header of your Windows partition should be checked as well.


Can you post the output of the following OSX Terminal commands (These do not make any changes to your partitions of files. Enter your password for the sudo commands).


diskutil list

diskutil cs list

sudo gpt -vv -r show /dev/disk0

sudo fdisk /dev/disk0


Once the BC partition is established, a dd command will show the NTFS header.


If your Windows NTFS is intact, the following steps can be used for W7/W8.


1. If you have a built-in Optical drive, insert installation media, otherwise use the USB created via BCA with the installation ISO and BC drivers.

2. Select System Preferences -> Startup Disk -> Bootcamp (Do not select the Installation Media) -> Restart.

3. Windows should boot from the Installation Media.

4. Use Repair Windows from the Installer window. Here is set of screen shots for W7 recovery. - http://imgur.com/a/1DaOE#0.

30 replies
Question marked as Top-ranking reply

Jan 19, 2015 12:37 PM in response to Charlie_Mc

The NTFS header of your Windows partition should be checked as well.


Can you post the output of the following OSX Terminal commands (These do not make any changes to your partitions of files. Enter your password for the sudo commands).


diskutil list

diskutil cs list

sudo gpt -vv -r show /dev/disk0

sudo fdisk /dev/disk0


Once the BC partition is established, a dd command will show the NTFS header.


If your Windows NTFS is intact, the following steps can be used for W7/W8.


1. If you have a built-in Optical drive, insert installation media, otherwise use the USB created via BCA with the installation ISO and BC drivers.

2. Select System Preferences -> Startup Disk -> Bootcamp (Do not select the Installation Media) -> Restart.

3. Windows should boot from the Installation Media.

4. Use Repair Windows from the Installer window. Here is set of screen shots for W7 recovery. - http://imgur.com/a/1DaOE#0.

Jan 19, 2015 2:08 PM in response to Loner T

Many thanks for your reply, here are the results of the commands -

diskutil list

User uploaded file

diskutil cs list

No CoreStorage logical volume groups found

sudo gpt -vv -r show /dev/disk0

User uploaded file

sudo fdisk /dev/disk0

User uploaded file

I tried to select Bootcamp in System Preferences -> Startup Disk -> but it does not show up there, it only shows up in Startup Manager when I restart and hold alt. Is there a way I can get it to show up again in Startup Disk?

Jan 19, 2015 2:18 PM in response to Charlie_Mc

Apple NTFS driver, which allows System Preferences -> Startup Disk to show the Windows partition cannot find a NTFS header. It shows up in Bootmanager using the Alt key due to the entry in Fdisk output at item #2.


Can you post the output of the following command? It dumps the NTFS header on the Disk0s4 slice.


sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C

Jan 20, 2015 3:39 AM in response to Loner T

Ok here are the outputs from my testdisk -

User uploaded file

User uploaded file

Should I go ahead and do the Gdisk part described in that thread using my values from the first screen shot? -


Rebuild GPT4 using start/end offsets


  1. Sudo gdisk /dev/rdisk0
  2. P (print the full list of parts)
  3. D (delete)
  4. 4 (part 4)
  5. N (new part)
  6. 4 (part 4)
  7. 743868416 - Start offset in bytes (start point for Bootcamp part)
  8. +232904697(Size offset as opposed to End offset)
  9. 0700 (Windows part type)
  10. P (print list of all parts just to see what changes will be made)
  11. W (Write the new GPT)
  12. Y (Yes! really write the new GPT)

This will delete and re-write the GPT partition info for /dev/disk0s4.

Jan 20, 2015 5:05 AM in response to Charlie_Mc

The difference between the end of GPT3 (694408016) and start of NTFS that you have found (743868416) is about 49460400 sectors

( ~ 24GB). Was that the disk space you were planning to use for re-sizing Windows? It will be lost space, between GPT3 and GPT4, once you make your changes. If you are willing to accept that 'loss', yes, you can do both Gdisk steps, using your values of start/size.


The only method to get it back is to backup OS X, backup Windows (using Winclone or Camptune - Windows backup requires additional work and has some additional challenges), erase the internal drive, restore OS X and then restore Windows.


I recommend that you recover Windows first and then decide.

Jan 20, 2015 5:28 AM in response to Loner T

Should I also follow these instructions from the thread? -


Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR. Use defaults for other questions (like partition codes).

  1. Sudo gdisk /dev/disk0
  2. P (Print list of parts)
  3. R (Recover)
  4. H (chooses Hybrid)
  5. Partitions numbers to be hybridized: 2 3 4
  6. Y (Good for GRUB question)
  7. N (part 2 boot flag)
  8. N (part 3 boot flag)
  9. Y (part 4 boot flag make NTFS bootable partition)
  10. W (Write the new MBR)
  11. Y (Yes! write the new MBR)
  12. Reboot

Jan 20, 2015 5:36 AM in response to Charlie_Mc

I have OS X backed up with Time Machine, is a back up with this sufficient for this task?

TM is the easiest source to use for backup/restore.


Charlie_Mc wrote:


Should I also follow these instructions from the thread? -


Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR.

Yes, but can you also post the output of the following command (before or after these steps is fine).


sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C

How do I run Win7 Startup Repair from USB to repair Bootcamp installation?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.