taibanl

Q: Fixing missing Bootcamp partition after Mavericks rewrote wrong GPT

Screen Shot 2013-11-14 at 3.56.59 PM.pngPreviously resized my boot camp partition (manually)

 

Installed Mavericks

 

Boot Camp disappeared

 

Disk0s4 is visible in Disk utility but reflects the OLD disk size (pre-resize) and additional space (available for OSX expansion) now appears in its place

 

[REDACTED] sudo gpt -r -vv show disk0

 

WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.

 

To proceed, enter your password, or type Ctrl-C to abort.

 

Password:

gpt show: disk0: mediasize=240057409536; sectorsize=512; blocks=468862128

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 468862127

      start       size  index  contents

          0          1         MBR

          1          1         Pri GPT header

          2         32         Pri GPT table

         34          6       

         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

     409640  312500000      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

  312909640    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

  314179176   76558744       

  390737920   78123008      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  468860928       1167       

  468862095         32         Sec GPT table

  468862127          1         Sec GPT header

[REDACTED] sudo fdisk /dev/disk0

Disk: /dev/disk0          geometry: 29185/255/63 [468862128 sectors]

Signature: 0xAA55

         Starting       Ending

#: id  cyl  hd sec -  cyl  hd sec [     start -       size]

------------------------------------------------------------------------

1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>

2: AF 1023 254  63 - 1023 254  63 [    409640 -  312500000] HFS+      

3: AB 1023 254  63 - 1023 254  63 [ 312909640 -    1269536] Darwin Boot

4: 0C 1023 254  63 - 1023 254  63 [ 390737920 -   78123008] Win95 FAT32L

[REDACTED ]

MacBook, OS X Mavericks (10.9)

Posted on Nov 29, 2013 6:04 PM

Close

Q: Fixing missing Bootcamp partition after Mavericks rewrote wrong GPT

  • All replies
  • Helpful answers

first Previous Page 4 of 4
  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Mar 13, 2014 9:32 AM in response to boswan
    Level 3 (555 points)
    Mar 13, 2014 9:32 AM in response to boswan

    No one suggested you use Test Disk. It wasn't indicated for your problem. I said your next step if the partition fixing didn't work was to use Windows Startup Repair, not Test Disk. There's no evidence or motive for the Mavericks installer to read or write within the Boot Camp partition. It would have to write inside that partition to damage the file system. If that's really happening, it's a whole different category of data loss.

     

    When you boot OS X does the Boot Camp volume automount? Can you see it in the Finder, and can you navigate it and find folders and files on it? If so, it's not damaged. Run Windows Startup Repair.

  • by boswan,

    boswan boswan Mar 13, 2014 10:53 AM in response to Christopher Murphy
    Level 1 (0 points)
    Mar 13, 2014 10:53 AM in response to Christopher Murphy

    I thought there might be some missing partitions that could be uncovered by Test Disk.  No, the drive does not show up in finder (it used to).

     

    Is there a way to execute "Ctrl-Alt-Del"? That is what it asks me to do, but I couldn't come up with the right key combination to make it work. Or do I need to boot off my Windows Install CD to use "Windows Startup Repair"?

  • by Loner T,

    Loner T Loner T Mar 13, 2014 11:34 AM in response to boswan
    Level 7 (24,202 points)
    Safari
    Mar 13, 2014 11:34 AM in response to boswan

    boswan wrote:

     

    Is there a way to execute "Ctrl-Alt-Del"? That is what it asks me to do, but I couldn't come up with the right key combination to make it work.

    On MAC use fn+ctrl+alt(option)+delete combination.

  • by alienwang,

    alienwang alienwang Mar 20, 2014 10:31 PM in response to Christopher Murphy
    Level 1 (0 points)
    Mar 20, 2014 10:31 PM in response to Christopher Murphy

    Hi Christopher, I find this post online and it seems you really know the problem well. I encounter the similar problem, could you help me with it when you've time? Thanks!

     

    sudo gpt -r -vv show disk0


    gpt show: disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

    gpt show: disk0: Suspicious MBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 490234751

          start       size  index  contents

              0          1         MBR

              1          1         Pri GPT header

              2         32         Pri GPT table

             34          6        

             40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

         409640  259132008      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      259541648    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

      260811184   33838672        

      294649856  195584000      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      490233856        863        

      490234719         32         Sec GPT table

      490234751          1         Sec GPT header

     

    I've set the id of partition 4 to 07 and flag it as bootable then the result of "sudo fdisk /dev/disk0" is

     

    Disk: /dev/disk0geometry: 30515/255/63 [490234752 sectors]

    Signature: 0xAA55

             Starting       Ending

    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]

    ------------------------------------------------------------------------

    1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>

    2: AF 1023 254  63 - 1023 254  63 [    409640 -  259132008] HFS+       

    3: AB 1023 254  63 - 1023 254  63 [ 259541648 -    1269536] Darwin Boot

    *4: 07 1023 254  63 - 1023 254  63 [ 294649856 -  195584000] HPFS/QNX/AUX

     

    The Win 7 on bootcamp will encounter missing critical files error when booting. The partition 4 may start at the wrong position as I understand after reading your posts, but I don't know how I can set it correctly. Appreciate your help!


  • by Loner T,

    Loner T Loner T Mar 26, 2014 7:26 AM in response to alienwang
    Level 7 (24,202 points)
    Safari
    Mar 26, 2014 7:26 AM in response to alienwang

    alienwang wrote:

     

     

      294649856  195584000      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

     

    *4: 07 1023 254  63 - 1023 254  63 [ 294649856195584000] HPFS/QNX/AUX

     

    The Win 7 on bootcamp will encounter missing critical files error when booting. The partition 4 may start at the wrong position as I understand after reading your posts, but I don't know how I can set it correctly. Appreciate your help!


     

    Your partitions look all right. Windows boot errors may need to be fixed using Windows Recovery Console or a re-installation of the OS only.

  • by pipinindrawan,

    pipinindrawan pipinindrawan Sep 9, 2014 12:14 AM in response to Christopher Murphy
    Level 1 (0 points)
    Sep 9, 2014 12:14 AM in response to Christopher Murphy

    Hi, can you help me too. I have exactly same problem.

     

    Here is GPT,

    sudo gpt -r -vv show disk0

    Password:

    gpt show: disk0: mediasize=500107862016; sectorsize=512; blocks=976773168

    gpt show: disk0: PMBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 976773167

          start       size  index  contents

              0          1         PMBR

              1          1         Pri GPT header

              2         32         Pri GPT table

             34          6        

             40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

         409640  702915360      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      703325000    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

      704594536  272178599        

      976773135         32         Sec GPT table

      976773167          1         Sec GPT header

     

    Here is fdisk result

    sudo fdisk /dev/rdisk0

    Disk: /dev/rdisk0 geometry: 60801/255/63 [976773168 sectors]

    Signature: 0xAA55

             Starting       Ending

    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]

    ------------------------------------------------------------------------

    1: EE 1023 254  63 - 1023 254  63 [         1 -  976773167] <Unknown ID>

    2: 00    0   0   0 -    0   0   0 [         0 -          0] unused     

    3: 00    0   0   0 -    0   0   0 [         0 -          0] unused     

    4: 00    0   0   0 -    0   0   0 [         0 -          0] unused 

     

    Gdisk result

     

    sudo gdisk /dev/disk0

    GPT fdisk (gdisk) version 0.8.10

     

    Warning: Devices opened with shared lock will not have their

    partition table automatically reloaded!

    Partition table scan:

      MBR: protective

      BSD: not present

      APM: not present

      GPT: present

     

    Found valid GPT with protective MBR; using GPT.

     

    Thank you.

  • by pipinindrawan,

    pipinindrawan pipinindrawan Sep 9, 2014 12:32 AM in response to pipinindrawan
    Level 1 (0 points)
    Sep 9, 2014 12:32 AM in response to pipinindrawan

    Add :

    Diskutil Result

     

    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 Macintosh HD            359.9 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data                         101.0 GB   disk0s4

     

    Gdisk

     

    sudo gdisk /dev/disk0

    GPT fdisk (gdisk) version 0.8.10

     

    Warning: Devices opened with shared lock will not have their

    partition table automatically reloaded!

    Partition table scan:

      MBR: protective

      BSD: not present

      APM: not present

      GPT: present

     

    Found valid GPT with protective MBR; using GPT.

     

    Command (? for help): p

    Disk /dev/disk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 0000675B-12B2-0000-2C17-000041680000

    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 272178605 sectors (129.8 GiB)

     

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

       1              40          409639   200.0 MiB   EF00  EFI system partition

       2          409640       703324999   335.2 GiB   AF00  Customer

       3       703325000       704594535   619.9 MiB   AB00  Recovery HD

  • by Loner T,

    Loner T Loner T Sep 9, 2014 5:27 AM in response to pipinindrawan
    Level 7 (24,202 points)
    Safari
    Sep 9, 2014 5:27 AM in response to pipinindrawan

    Please start a new thread and post a reference back here. What was  done to the GPT#4 and MBR indicates a GPT-only disk? What events led to the loss of Bootcamp partition?

  • by kentonfromdenton,

    kentonfromdenton kentonfromdenton Sep 21, 2014 9:01 PM in response to Christopher Murphy
    Level 1 (0 points)
    Sep 21, 2014 9:01 PM in response to Christopher Murphy

    I think I am having the same issue.  I created a bootcamp partition and then resized it later on for my windows.  Mavericks installed and seemed not to affect it, but today my bootcamp partition disappeared.  I have read through this post and many others and I need a bit of guidance on how to proceed.  I'm not gun-shy with using terminal, but there are some work files on the windows side that I cannot lose (client files, etc.), so I need to be careful.  Here is what I found so far:

     

    Disk /dev/disk0 - 750 GB / 698 GiB - 1465149168 sectors (RO)

    Current partition structure:

    Partition                  Start        End    Size in sectors

     

    1 P EFI System                    40     409639 409600 [EFI system partitio

    2 P Mac HFS                   409640 1075084335 1074674696 [Customer]

    3 P Mac Boot              1075084336 1076353871    1269536 [Recovery HD]

    No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker

    4 P MS Data               1269837824 1465147391  195309568 [BOOTCAMP]

    4 P MS Data               1269837824 1465147391  195309568 [BOOTCAMP]

     

    I can see the bootcamp using this tool, but I'm not sure why it is not showing up on the following, unlike the original post:


    Disk /dev/disk0 - 750 GB / 698 GiB - 1465149168 sectors (RO)

    Partition               Start        End    Size in sectors

    >P EFI System                    40     409639 409600 [EFI]

    D Mac HFS                   409640 1075084335 1074674696

    D MS Data                687562760 1076355072  388792313

    D Mac HFS               1075084336 1076353871    1269536

    D MS Data               1076355072 1465147384  388792313

    D MS Data               1076355079 1465147391  388792313

    D Mac HFS               1463879592 1465149127    1269536


    Any thoughts on how to move forward are much appreciated!

  • by Loner T,

    Loner T Loner T Sep 22, 2014 4:11 AM in response to kentonfromdenton
    Level 7 (24,202 points)
    Safari
    Sep 22, 2014 4:11 AM in response to kentonfromdenton

    Please post a new thread and reference to it here. It avoids confusion and makes it a bit easier to manage and read. Since you are in Testdisk, check each MS Data entry for any familiar files. You can see the movement of Recovery HD and MS Data with two separate entries. Can you also post the the output of

     

    sudo fdisk /dev/disk0

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

     

    in the new thread?

  • by kentonfromdenton,

    kentonfromdenton kentonfromdenton Sep 22, 2014 5:47 AM in response to Loner T
    Level 1 (0 points)
    Sep 22, 2014 5:47 AM in response to Loner T
  • by Adrianching,

    Adrianching Adrianching Oct 1, 2014 3:36 PM in response to taibanl
    Level 1 (0 points)
    Oct 1, 2014 3:36 PM in response to taibanl

    Hi taibnal,

     

    seems you got the problem solved! i have the same problem.... exactly same as the one you had..

     

    this Screen Shot 2014-10-01 at 11.31.16 pm.pngScreen Shot 2014-10-01 at 11.31.16 pm.png

     

    I have no idea how to use sudo or gdisk..

    can anyone tell me how to do with the solution that Christopher Murphy has mentioned?

    like what sort of code i should type in step by step..

     

    Screen Shot 2014-10-01 at 11.33.02 pm.png

     

    I feel like dying now...

     

    your help will be appreciated very much!!!

    i really nee you guys help!!

     

    P.S.

    i was following your code to make this data appear in Terminal...

  • by Adrianching,

    Adrianching Adrianching Oct 1, 2014 4:09 PM in response to Adrianching
    Level 1 (0 points)
    Oct 1, 2014 4:09 PM in response to Adrianching

    here is my MBP's info...

    Screen Shot 2014-10-02 at 12.08.15 am.png

    really need your HELP!

    hope i can get your guys reply...

     

    adrian

  • by Loner T,

    Loner T Loner T Oct 1, 2014 4:33 PM in response to Adrianching
    Level 7 (24,202 points)
    Safari
    Oct 1, 2014 4:33 PM in response to Adrianching

    Please start a new thread and post the output of the following commands from OSX Terminal in that thread. Post a reference to that thread here.

     

     

    1. diskutil list

    2. diskutil cs list

    3. sudo gpt -vv -r show /dev/BootcampDiskWithoutSlice (where BootcampDiskWithoutSlice is of the form disk0 and is visible from the output of 1.)

    4. sudo fdisk /dev/BootcampDiskWithoutSlice

    5. sudo dd if=/dev/rBootcampDisk count=1 2>/dev/null | hexdump -C (where BootcampDisk is of the form disk0s4 and is visible from the output of 1. Please note the 'r' preceding the disk0s4 format).

  • by Adrianching,

    Adrianching Adrianching Oct 1, 2014 4:57 PM in response to Loner T
    Level 1 (0 points)
    Oct 1, 2014 4:57 PM in response to Loner T

    Thank for your reply!!!!

    here is the new threat: Bootcamp missing after expanding partition

first Previous Page 4 of 4