iv-sashok

Q: Repairing win7 bootcamp partition after making new partition

Hello!

 

I have Macbook(Late 13) and installed OS X 10.11 beta and windows 7 in bootcamp.

At first I left 65 GB for Win7, but some days ago I decided to increase the size of bootcamp, so I created a new "Untitled" partition(~19.91 GB) for further adding  to Win7 partition. Then I saw, that Win7 partition disappeared from the "alt-option load" and from Startup disk utility.

 

Attached screenshots.

I hope I can get help here.

Screenshot 2016-01-08 21.49.28.png

Screenshot 2016-01-08 21.54.34.png

Screenshot 2016-01-08 21.56.33.png

Screenshot 2016-01-08 21.55.16.png

Screenshot 2016-01-08 21.55.47.png

MacBook Pro (Retina, 13-inch, Late 2013), OS X El Capitan (10.11)

Posted on Jan 8, 2016 11:59 AM

Close

Q: Repairing win7 bootcamp partition after making new partition

  • All replies
  • Helpful answers

  • by Loner T,

    Loner T Loner T Jan 8, 2016 12:11 PM in response to iv-sashok
    Level 7 (24,738 points)
    Safari
    Jan 8, 2016 12:11 PM in response to iv-sashok

    Can you post the output of

     

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

  • by iv-sashok,

    iv-sashok iv-sashok Jan 8, 2016 12:14 PM in response to Loner T
    Level 1 (0 points)
    Jan 8, 2016 12:14 PM in response to Loner T

    Of course!
    Thank you for reply.

    Screenshot 2016-01-08 22.13.36.png

  • by Loner T,Solvedanswer

    Loner T Loner T Jan 19, 2016 5:05 AM in response to iv-sashok
    Level 7 (24,738 points)
    Safari
    Jan 19, 2016 5:05 AM in response to iv-sashok

    A. We need to disable SIP.

     

    1. Boot into Local Recovery (Command+R).

    2. Start Utilities -> Terminal.

    3. Type csrutil disable in Terminal and press Enter/Return.

    4. Type csrutil status.

    5. Boot normally, and type csrutil status to confirm that all individual entries are still disabled.

     

    B. Rebuild non-standard MBR.

     

    The following steps are non-standard because there is a third user-visible partition. Typically, there are two such partitions in a normal configuration on a single-disk Mac with OS X and Bootcamp. This is fragile and lack of proper backups can lead to potential data loss. Download GPT Fdisk from http://sourceforge.net/projects/gptfdisk/ and install it on the OS X side. The following steps are executed when booted in OS X. If the 79G is converted to Free Space, these numbers (3 4 5) will change back to (2 3 4).

     

    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. Please see the sample Q&A before you execute these steps.

    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: 3 4 5
    7. Y  (Good for GRUB question)
    8. N  (part 3 boot flag)
    9. N  (part 4 boot flag)
    10. Y  (part 5 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. Accept defaults offered by Gdisk.

     

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

     

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

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

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

     

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

    Enter an MBR hex code (default AB or 0B or 0C): Press Enter/Return

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

     

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

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

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

  • by iv-sashok,

    iv-sashok iv-sashok Jan 8, 2016 1:55 PM in response to Loner T
    Level 1 (0 points)
    Jan 8, 2016 1:55 PM in response to Loner T

    Thank you very much for help!
    I tried A method, but it didn't help me.
    Then I tried B method, and now I can see Win7 partition in "alt-option" load. Great! You really helped me

     

    But now, can I ask you another question?
    As I said at the first post, I want to increase Win7 partition size. So I want to add new Untitled partition to the Win7 partition.
    I found one method:how to resize my bootcamp partition without deleting  itit

    In Mini Tool Partition Wizard new "Untitled" partition shows as Used partition(not unallocated), so I can't add it to Win7. 'Cause when I tap on Extend button of Bootcamp partition I saw an offer of extending by maximum 128MB from unallocated partition(don't know what it is).
    So, the question, how to make new partition unallocated?

  • by Loner T,

    Loner T Loner T Jan 8, 2016 2:46 PM in response to iv-sashok
    Level 7 (24,738 points)
    Safari
    Jan 8, 2016 2:46 PM in response to iv-sashok

    Step A enables the capability to write to disk partition table in Step B. They are both required.

     

    Do not use the MiniTool. It does not work. You will need to use GParted. You will first need to convert disk0s4 (Untitled) to Free Space and then merge it into Bootcamp.

  • by iv-sashok,

    iv-sashok iv-sashok Jan 8, 2016 3:55 PM in response to Loner T
    Level 1 (0 points)
    Jan 8, 2016 3:55 PM in response to Loner T

    Can you explain how to do that? I booted GParted and don't see option of converting this Untitled partition to Free Space

  • by Loner T,

    Loner T Loner T Jan 8, 2016 4:25 PM in response to iv-sashok
    Level 7 (24,738 points)
    Safari
    Jan 8, 2016 4:25 PM in response to iv-sashok

    From OS X Terminal

     

    diskutil eraseVolume free FREE disk0s4

     

    You will get an error because the disk0s4 will no longer exist. If you do this, you will also need to recreate the MBR using 2 3 4, because it is 3 4 5 right now.

  • by iv-sashok,

    iv-sashok iv-sashok Jan 8, 2016 4:37 PM in response to Loner T
    Level 1 (0 points)
    Jan 8, 2016 4:37 PM in response to Loner T

    Though I could convert Untitled partition to unallocated space in GParted, and then I resized Win7 partition, so I did what I wanted.
    But Untitled partition exist with some ~116MB, and Bootcamp now ~84GB(was ~65GB).
    When I run Win7 from alt/option load, I get error - "Missing Operation System". Can you help me? What can I do now?

  • by Loner T,

    Loner T Loner T Jan 8, 2016 5:12 PM in response to iv-sashok
    Level 7 (24,738 points)
    Safari
    Jan 8, 2016 5:12 PM in response to iv-sashok

    You need to drag the GParted pointer to cover the 116MB, otherwise you may run into issues. You need to re-run the Steps A and B, and use "2 3 4" in step B/6, because you deleted 5.

  • by iv-sashok,

    iv-sashok iv-sashok Jan 8, 2016 5:44 PM in response to Loner T
    Level 1 (0 points)
    Jan 8, 2016 5:44 PM in response to Loner T

    I removed this Untitled partition(~116mb), and re-run steps A, B. Now I had another issue while loading Win7.

    20160109_033753.jpg

    after clicking Return button:

    20160109_033833.jpg

  • by Loner T,

    Loner T Loner T Jan 8, 2016 5:59 PM in response to iv-sashok
    Level 7 (24,738 points)
    Safari
    Jan 8, 2016 5:59 PM in response to iv-sashok