hennweb

Q: How to Fix the lost Bootcamp Partition after Resizing Mac OS X Partition

I have a MacBook Pro (15-inch Early 2008:cool: with OS X 10.10.5 (14F27).


Today I try to change my Macbook partition sizes and Windows Bootcamp would not show in the Boot menu. I installed CampTune demo to resize bootcamp size to add 100gb to the current bootcam partition. but now my Bootcamp partition is gone and cant be seen in disk utility.

 

I try it out this program but it is stuck at the "Your system is being scanned for a Boot Camp Configuration" screen and goes no where. I've let it sit for quite some time. I've rebooted and tried, repaired permissions and tried... nothing.

 

typed on the terminal: diskutil list... and  I get this:

 

Name:~ User$ diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Mac OS 223.5 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

Name:~ User$

 

Bootcamp partition is not listed!!. Is any chance to recover my win7 partition?

 

Please help! now I am in panic!!!

MacBook Pro (15-inch Early 2008), OS X Yosemite (10.10.5)

Posted on Aug 22, 2015 9:01 PM

Close

Q: How to Fix the lost Bootcamp Partition after Resizing Mac OS X Partition

  • All replies
  • Helpful answers

first Previous Page 3 of 3
  • by hennweb,

    hennweb hennweb Aug 25, 2015 8:23 AM in response to Loner T
    Level 1 (0 points)
    Aug 25, 2015 8:23 AM in response to Loner T

    Yes i think the same.

    Is any chance you can remotely control the machine so you can review faster if there are chances of recovery? or what is the next steep?I leave the terminal like the last screen shot.

  • by Loner T,Solvedanswer

    Loner T Loner T Aug 25, 2015 8:48 AM in response to hennweb
    Level 7 (24,419 points)
    Safari
    Aug 25, 2015 8:48 AM in response to hennweb

    hennweb wrote:

     

    Is any chance you can remotely control the machine so you can review faster if there are chances of recovery?

    No. Unless you can verify that I work for Apple (which I do not ), for your own safety, do not allow remote access to your machine under any circumstances.

     

    or what is the next steep?I leave the terminal like the last screen shot.

     

    Please read to the end of this part before you start executing these steps.

     

    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 (this is called offset notation). The text in parentheses is for informational purpose to describe the action being taken. Gdisk has one-character commands except when entering numbers.

     

    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. 438173696 ( - Start offset in sectors or the start point for Bootcamp part)
    8. +391108608 ( - 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 hennweb,

    hennweb hennweb Aug 25, 2015 11:49 PM in response to Loner T
    Level 1 (0 points)
    Aug 25, 2015 11:49 PM in response to Loner T

    Loner T wrote:

     

    Install GPT Fdisk (aka gdisk). 

    Mr Loner T.

    thank you for your time on all your comments. I just installed this program but I can not find it in the Applications Folder. This program is called by the terminal commands automatically? or how I open it?

  • by Loner T,

    Loner T Loner T Aug 26, 2015 3:39 AM in response to hennweb
    Level 7 (24,419 points)
    Safari
    Aug 26, 2015 3:39 AM in response to hennweb

    If you open /Applications/Utilities/Terminal and type type gdisk you should see a response which says /usr/sbin/gdisk . This is where it is installed. Once you are in the Terminal window, following the first set of steps. Please post back if you see any error messages.

  • by hennweb,

    hennweb hennweb Aug 26, 2015 9:01 AM in response to Loner T
    Level 1 (0 points)
    Aug 26, 2015 9:01 AM in response to Loner T

    LonerT,

    The list do not show part4 I receive a error on step 4 of your list:

     

    PT 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): p

    Disk /dev/rdisk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): C984094A-7024-4B95-B47E-ADFB6F870F73

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 976773134

    Partitions will be aligned on 8-sector boundaries

    Total free space is 538602637 sectors (256.8 GiB)

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640       436900967   208.1 GiB   AF00  Mac OS

       3       436903936       438173471   619.9 MiB   AB00  Recovery HD

     

    Command (? for help): D

    Partition number (1-3): 4

    Value out of range

    Partition number (1-3):

     

    what do you think?

  • by Loner T,

    Loner T Loner T Aug 26, 2015 1:04 PM in response to hennweb
    Level 7 (24,419 points)
    Safari
    Aug 26, 2015 1:04 PM in response to hennweb

    Execute Step 5 and the following steps and continue.

  • by hennweb,

    hennweb hennweb Aug 26, 2015 3:24 PM in response to Loner T
    Level 1 (0 points)
    Aug 26, 2015 3:24 PM in response to Loner T

    Ok mr Loner T, I done all steps from the first list.

    Let me know if any error:

    it is necessary to reboot before start with the steps on the second list?

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640       436900967   208.1 GiB   AF00  Mac OS

       3       436903936       438173471   619.9 MiB   AB00  Recovery HD

     

    Command (? for help): n

    Partition number (4-128, default 4): 4

    First sector (34-976773134, default = 438173472) or {+-}size{KMGTP}: 438173696

    Last sector (438173696-976773134, default = 976773134) or {+-}size{KMGTP}: +391108608

    Current type is 'Apple HFS/HFS+'

    Hex code or GUID (L to show codes, Enter = AF00): 0700

    Changed type of partition to 'Microsoft basic data'

     

    Command (? for help): p

    Disk /dev/rdisk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): C984094A-7024-4B95-B47E-ADFB6F870F73

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 976773134

    Partitions will be aligned on 8-sector boundaries

    Total free space is 147494029 sectors (70.3 GiB)

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640       436900967   208.1 GiB   AF00  Mac OS

       3       436903936       438173471   619.9 MiB   AB00  Recovery HD

       4       438173696       829282303   186.5 GiB   0700  Microsoft basic data

     

    Command (? for help): w

     

    Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING

    PARTITIONS!!

     

    Do you want to proceed? (Y/N): y

    OK; writing new GUID partition table (GPT) to /dev/rdisk0.

    Warning: Devices opened with shared lock will not have their

    partition table automatically reloaded!

    Warning: The kernel may continue to use old or deleted partitions.

    You should reboot or remove the drive.

    The operation has completed successfully.

  • by Loner T,

    Loner T Loner T Aug 26, 2015 3:31 PM in response to hennweb
    Level 7 (24,419 points)
    Safari
    Aug 26, 2015 3:31 PM in response to hennweb

    This looks good. Please reboot or you can execute the second set of steps and reboot and test.

  • by hennweb,

    hennweb hennweb Aug 27, 2015 10:21 AM in response to Loner T
    Level 1 (0 points)
    Aug 27, 2015 10:21 AM in response to Loner T

    Mr Loner T,

    I just finished the second part of steps. The partition is now visible and accesible but windows do not boot. I think file system were lost due CampTuneX. Fortunately I can see most of the files that I was interested in. There are some "deleted" folders too. Can those folders been recovered by those professional data recovery services ? What do you think?

     

    btw thank you very much for your support and time helping on my issue.

  • by Loner T,

    Loner T Loner T Aug 27, 2015 3:55 PM in response to hennweb
    Level 7 (24,419 points)
    Safari
    Aug 27, 2015 3:55 PM in response to hennweb

    First and foremost make a backup of files on an external disk. Remove all third-party NTFS software till this can be fixed. Try Windows repair and see if you can boot into Windows.

first Previous Page 3 of 3