iAmEros

Q: How can I repair my Windows Bootcamp?

Hey all..

 

I tried to shrink my OSX partition today so I could use more space on my Windows Bootcamp. Surprise surprise I have no windows anymore...way I ca

 

Is there a way I can fix this? I did the "sudo fdisk" thing and my windows now shows up when I boot and hold option, but I get a message saying "no windows operating system found" or something of the sorts. I reaalllly really hope I can sort this without having to wipe it as I had stuff on there I can't replace..

 

Thanks in advance for any help, it would be extremely appreciated.

MacBook Pro, OS X Mavericks (10.9.5), Windows 7 Profession Legit Copy

Posted on Jun 12, 2015 12:34 AM

Close

Q: How can I repair my Windows Bootcamp?

  • All replies
  • Helpful answers

first Previous Page 3 of 6 last Next
  • by Loner T,

    Loner T Loner T Jun 12, 2015 8:35 PM in response to iAmEros
    Level 7 (24,855 points)
    Safari
    Jun 12, 2015 8:35 PM in response to iAmEros

    Install GPT Fdisk (aka gdisk).


    Leave your Testdisk display and start a new Terminal Window. You need to use the following steps. If you see any error messages during the following steps, please stop and post back here with the error message. The following steps have values from your Testdisk output (and you can verify) in Steps 7 and 8. Please notice the '+' sign in step 8. The text in parentheses is for informational purpose to describe the action being taken. Gdisk has one-character commands.

     

    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. 667831308 - Start offset in bytes  (start point for Bootcamp part)
    8. +313882617  - 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.



    Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR. Use defaults for other questions (like partition codes). The only values that need modifications are the Boot flags and step 10. Accept all other defaults that Gdisk offers. Please see the sample Q&A as an example. These steps can be repeated if you make a mistake before you get to Step 12, otherwise start from Step 1 for these steps. Step 6 has numbers which are typed with a space between the numbers.


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

     

    Here is sample Q&A for this section. Please notice the Press Enter/Return.

     

    Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y

     

    Creating entry for GPT partition #2 (MBR partition #2)

    Enter an MBR hex code (default AF): Press Enter/Return

    Set the bootable flag? (Y/N): N

     

    Creating entry for GPT partition #3 (MBR partition #3)

    Enter an MBR hex code (default AB): Press Enter/Return

    Set the bootable flag? (Y/N): N

     

    Creating entry for GPT partition #4 (MBR partition #4)

    Enter an MBR hex code (default 07): Press Enter/Return

    Set the bootable flag? (Y/N): Y

     

    Test 1 - Does Bootcamp Volume show up in Finder?

    Test 2 - Can you see files in Bootcamp Volume?

    Test 3 - Can you select Bootcamp in System Preferences -> Startup Disk?

    Test 4 - If Test 3 is successful, select Bootcamp and Click Restart.

  • by iAmEros,

    iAmEros iAmEros Jun 12, 2015 10:16 PM in response to Loner T
    Level 1 (0 points)
    Jun 12, 2015 10:16 PM in response to Loner T

    Okay did all that but none of the tests worked..

  • by iAmEros,

    iAmEros iAmEros Jun 13, 2015 4:00 AM in response to Loner T
    Level 1 (0 points)
    Jun 13, 2015 4:00 AM in response to Loner T

    I also didn't receive any error messages, it worked (in a sense) but I still can't access it. Is there a chance the phoenix tool could help?

  • by Loner T,

    Loner T Loner T Jun 13, 2015 6:30 AM in response to iAmEros
    Level 7 (24,855 points)
    Safari
    Jun 13, 2015 6:30 AM in response to iAmEros

    Can you post the output of

     

    sudo gpt -vv -r show /dev/disk0

    sudo fdisk /dev/disk0

  • by iAmEros,

    iAmEros iAmEros Jun 13, 2015 9:56 PM in response to Loner T
    Level 1 (0 points)
    Jun 13, 2015 9:56 PM in response to Loner T

    Screen Shot 2015-06-14 at 4.51.09 pm.png

    (Note, the 4 digits that are slightly cut out are B, C, C, 7)

    Screen Shot 2015-06-14 at 4.53.21 pm.png

     

    Here you go

  • by Loner T,

    Loner T Loner T Jun 13, 2015 10:04 PM in response to iAmEros
    Level 7 (24,855 points)
    Safari
    Jun 13, 2015 10:04 PM in response to iAmEros

    You have a typo in step 7 in the first set of Gdisk steps. You are using 667831304, but step 7 shows 667831308 as the value to be used. The 4 sector difference at the beginning of the partition is crucial.

     

    Can you repeat both sets of Gdisk steps and test again? In the second of Gdisk steps, you have typed an 'n' for a MBR hex code which shows up in MBR2 as Xenix /usr partition, but it should be Apple HFS/HFS+.

  • by iAmEros,

    iAmEros iAmEros Jun 13, 2015 11:11 PM in response to Loner T
    Level 1 (0 points)
    Jun 13, 2015 11:11 PM in response to Loner T

    Okay I repeated the steps making sure there were no typos, this is what happened:

     

    Screen Shot 2015-06-14 at 6.03.27 pm.png

    **Changes it from 667831308 to 667831304**

     

    Screen Shot 2015-06-14 at 6.04.23 pm.png

     

    Hope this helps shed the light a bit

  • by Loner T,

    Loner T Loner T Jun 14, 2015 5:24 AM in response to iAmEros
    Level 7 (24,855 points)
    Safari
    Jun 14, 2015 5:24 AM in response to iAmEros

    Yes, it does. Please see how to set it to 1-sector alignment as shown. Once you set it to 1-sector boundary, continue the same session with Step 2 of the first set of Gdisk steps (do not exit from Gdisk).

     

    sudo gdisk /dev/disk0

    GPT fdisk (gdisk) version 1.0.0

     

    Warning: Devices opened with shared lock will not have their

    partition table automatically reloaded!

    Partition table scan:

      MBR: hybrid

      BSD: not present

      APM: not present

      GPT: present

     

    Found valid GPT with hybrid MBR; using GPT.

     

    Command (? for help): x

     

    Expert command (? for help): d

    Partitions will begin on 8-sector boundaries.

     

    Expert command (? for help): l

    Enter the sector alignment value (1-65536, default = 2048): 1

     

    Expert command (? for help): d

    Partitions will begin on 1-sector boundaries.

     

    Expert command (? for help): m

     

    Command (? for help):

  • by iAmEros,

    iAmEros iAmEros Jun 14, 2015 6:07 AM in response to Loner T
    Level 1 (0 points)
    Jun 14, 2015 6:07 AM in response to Loner T

    Okay have done all that, now I see a device in finder that wasn't there before "EFISECTOR" I haven't tried to boot into it yet I'll try that now and get back to you with results. I couldn't see it in startup devices mind you so fingers crossed..

  • by Loner T,

    Loner T Loner T Jun 14, 2015 6:09 AM in response to iAmEros
    Level 7 (24,855 points)
    Safari
    Jun 14, 2015 6:09 AM in response to iAmEros

    Before you try  to switch to OS X, can you see any other volumes or any familiar files in Finder on this volume? Can you post a Finder screen shot?

  • by iAmEros,

    iAmEros iAmEros Jun 14, 2015 6:13 AM in response to Loner T
    Level 1 (0 points)
    Jun 14, 2015 6:13 AM in response to Loner T

    Okay here's the screenshot:

     

    Screen Shot 2015-06-15 at 1.11.42 am.png

     

    Screen Shot 2015-06-15 at 1.12.00 am.png

     

    Screen Shot 2015-06-15 at 1.12.06 am.png

  • by iAmEros,

    iAmEros iAmEros Jun 14, 2015 6:38 AM in response to iAmEros
    Level 1 (0 points)
    Jun 14, 2015 6:38 AM in response to iAmEros

    And now when I try boot into windows there's a new error message which reads; "Non-system disk or disk error, replace and press any key"

  • by Loner T,

    Loner T Loner T Jun 14, 2015 6:44 AM in response to iAmEros
    Level 7 (24,855 points)
    Safari
    Jun 14, 2015 6:44 AM in response to iAmEros

    What is the size of your EFI volume, if you right click on it and select Get Info?

  • by iAmEros,

    iAmEros iAmEros Jun 14, 2015 7:44 AM in response to Loner T
    Level 1 (0 points)
    Jun 14, 2015 7:44 AM in response to Loner T

    Screen Shot 2015-06-15 at 2.43.23 am.png

     

    This is strange..

  • by Loner T,

    Loner T Loner T Jun 14, 2015 8:01 AM in response to iAmEros
    Level 7 (24,855 points)
    Safari
    Jun 14, 2015 8:01 AM in response to iAmEros

    It is very strange, but expected based on the following listing from Testdisk.  Can you check the Stellar Recovery screen again with this GPT4 in place?

     

    Screen Shot 2015-06-12 at 11.50.43 pm.png

first Previous Page 3 of 6 last Next