KaiKaiser

Q: Bootcamp missing after resizing manually

I know i have seen many threads, discussions about this kind of problem. Sorry if this is posted in here if its the wrong place I mean.

Well I did some reading and wasnt so sure about going further than what I've seen was successful for others (scared to damage or lose any files on my bootcamp).

 

I did resize it once, and it was successful, but this time it just suddenly turned to a disk0s4 and has an amount of the very first partition I had for the bootcamp (before resizing it successfully)

 

Thing is I'm not that confident without proper help or guide in repairing and any help would be greatly appreciated. I'm online this very moment and day I just want to wrap this up as I won't be able to sleep knowing that my sister's thesis report are in that bootcamp.

 

Here is so far what i have done.

 

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

gpt show: disk0: Suspicious MBR 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         MBR

          1          1         Pri GPT header

          2         32         Pri GPT table

         34          6        

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

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

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

  394345320  386630808        

  780976128  195796992      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  976773120         15        

  976773135         32         Sec GPT table

  976773167          1         Sec GPT header

 

 

Disk: /dev/disk0          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 -     409639] <Unknown ID>

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

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

4: 0C 1023 254  63 - 1023 254  63 [ 780976128 -  195796992] Win95 FAT32L

MacBook Pro, Mac OS X (10.7.5)

Posted on May 3, 2014 12:08 AM

Close

Q: Bootcamp missing after resizing manually

  • All replies
  • Helpful answers

Previous Page 2 of 6 last Next
  • by Loner T,

    Loner T Loner T May 3, 2014 1:17 PM in response to KaiKaiser
    Level 7 (24,855 points)
    Safari
    May 3, 2014 1:17 PM in response to KaiKaiser

    I would suggest that you backup the Bootcamp partition, even if Windows cannot be booted. MAC OS X can read Windows partition (it should show up mounted in Finder) and you can see files within the partition. This backup of an unbootable Windows is much better than no backup at all.

     

    Once you have this backup, you should try and reinstall (including reformatting the C: drive). Because of the resizing work done on the disk, Windows is unable to find NTFS information to allow it's use.

     

    On the issue of '07' vs '0C', you can use the fdisk -e command to change it back to 0C, but that will not address

    the disk corruption issue.  Diskutil list and gpt will still show the disk as Microsoft Basic Data because they use the GPT rather than MBR. The partition types in GPT should be the same.

     

    There is another utility called Testdisk, if you want to spend time looking for deleted partition information.

  • by KaiKaiser,

    KaiKaiser KaiKaiser May 3, 2014 10:07 PM in response to Loner T
    Level 1 (0 points)
    May 3, 2014 10:07 PM in response to Loner T

    The problem is i cant seem to find the c: or the bootcamp partition in finder on mac. Even if it shows up at the machines startup when holding alt/option.

  • by KaiKaiser,

    KaiKaiser KaiKaiser May 3, 2014 11:05 PM in response to Loner T
    Level 1 (0 points)
    May 3, 2014 11:05 PM in response to Loner T

    the disk0s4 is unmounted even if i try to mount it, it doesnt mount. Another problem is the disk0s4 is only 100GB which is the bootcamps first size when i created it. I resized it already to 250GB without having this problem. Is there any way to get back at least a the data from it? its around 200GB that i need to get. Or get at least a backup so if i re-install windows i can just use the backup to recreate it to its former?

  • by Loner T,

    Loner T Loner T May 4, 2014 5:10 AM in response to KaiKaiser
    Level 7 (24,855 points)
    Safari
    May 4, 2014 5:10 AM in response to KaiKaiser

      394345320  386630808       

      780976128  195796992      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

     

    The reason it may not mount is because of the difference between MBR and GPT.

     

    You can either look at testdisk (http://www.cgsecurity.org/wiki/TestDisk_Download) or GPT fdisk (http://sourceforge.net/projects/gptfdisk/) .

     

    Each can do different things. For example, Testdisk can let you look for files and lost partitions.

     

    GPT fdisk can be used to rebuild the GPT. One option here is to 'move' the GPT part 4 from 780976128 to 394345320 leaving the partition GUID type the same to see if it allows mounting the disk on the OSX side.

     

    One suggestion would be to back up the whole disk to another external drive (including Bootcamp), for example via Time Machine.

  • by KaiKaiser,

    KaiKaiser KaiKaiser May 4, 2014 5:15 AM in response to Loner T
    Level 1 (0 points)
    May 4, 2014 5:15 AM in response to Loner T

    Ok i get that point, so how am i going to change the GPT?

     

    EDITED: i have testdisk on my mac already, any instructions on what to do?

  • by Loner T,

    Loner T Loner T May 4, 2014 5:46 AM in response to KaiKaiser
    Level 7 (24,855 points)
    Safari
    May 4, 2014 5:46 AM in response to KaiKaiser

    TestDisk has a wiki. You may want to start there.

     

    For gdisk, there are menus that you use. You will primarily need to use the 'Recovery and Transformation' menu.

     

    Here are some options to consider for gdisk.

     

    sudo gdisk /dev/disk0

    Password:

    GPT fdisk (gdisk) version 0.8.9

     

    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): ?

    b          back up GPT data to a file

    c          change a partition's name

    d          delete a partition

    i          show detailed information on a partition

    l          list known partition types

    n          add a new partition

    o          create a new empty GUID partition table (GPT)

    p          print the partition table

    q          quit without saving changes

    r          recovery and transformation options (experts only)

    s          sort partitions

    t          change a partition's type code

    v          verify disk

    w          write table to disk and exit

    x          extra functionality (experts only)

    ?          print this menu

     

    Command (? for help): p

    Disk /dev/disk0: 1954210120 sectors, 931.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 6ED0C429-00D1-4759-B50E-04B6FB80D0E3

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 1954210086

    Partitions will be aligned on 8-sector boundaries

    Total free space is 1293 sectors (646.5 KiB)

     

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

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640      1452940543   692.6 GiB   AF00  Customer

       3      1452940544      1454210079   619.9 MiB   AB00  Recovery HD

       4      1454211072      1954209791   238.4 GiB   0700  BOOTCAMP

     

    Command (? for help): i

    Partition number (1-4): 4

    Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)

    Partition unique GUID: FEDA3E52-DED0-43F1-A598-75A28E17427B

    First sector: 1454211072 (at 693.4 GiB)

    Last sector: 1954209791 (at 931.8 GiB)

    Partition size: 499998720 sectors (238.4 GiB)

    Attribute flags: 0000000000000000

    Partition name: 'BOOTCAMP'

     

    Command (? for help): r

     

    Recovery/transformation command (? for help): ?

    b          use backup GPT header (rebuilding main)

    c          load backup partition table from disk (rebuilding main)

    d          use main GPT header (rebuilding backup)

    e          load main partition table from disk (rebuilding backup)

    f          load MBR and build fresh GPT from it

    g          convert GPT into MBR and exit

    h          make hybrid MBR

    i          show detailed information on a partition

    l          load partition data from a backup file

    m          return to main menu

    o          print protective MBR data

    p          print the partition table

    q          quit without saving changes

    t          transform BSD disklabel partition

    v          verify disk

    w          write table to disk and exit

    x          extra functionality (experts only)

    ?          print this menu

     

    Recovery/transformation command (? for help): x

     

    Expert command (? for help): ?

    a          set attributes

    c          change partition GUID

    d          display the sector alignment value

    e          relocate backup data structures to the end of the disk

    g          change disk GUID

    h          recompute CHS values in protective/hybrid MBR

    i          show detailed information on a partition

    l          set the sector alignment value

    m          return to main menu

    n          create a new protective MBR

    o          print protective MBR data

    p          print the partition table

    q          quit without saving changes

    r          recovery and transformation options (experts only)

    s          resize partition table

    t          transpose two partition table entries

    u          replicate partition table on new device

    v          verify disk

    w          write table to disk and exit

    z          zap (destroy) GPT data structures and exit

    ?          print this menu

     

    Expert command (? for help):

  • by KaiKaiser,

    KaiKaiser KaiKaiser May 4, 2014 5:57 AM in response to Loner T
    Level 1 (0 points)
    May 4, 2014 5:57 AM in response to Loner T

    Ok i know where to type those commands, im gonna check the testdisk wiki for awhile, could you tell me how to change the GPT on that partition 4 of mine just the commands, i mean, i didnt see it at your last comment (sorry being dumb)

  • by Loner T,

    Loner T Loner T May 4, 2014 6:20 AM in response to KaiKaiser
    Level 7 (24,855 points)
    Safari
    May 4, 2014 6:20 AM in response to KaiKaiser

    In gdisk, can you post the output from 'p' command?

     

    Also, please look here http://www.rodsbooks.com/gdisk/walkthrough.html . It is a full tutorial on gdisk.

  • by KaiKaiser,

    KaiKaiser KaiKaiser May 4, 2014 6:32 AM in response to Loner T
    Level 1 (0 points)
    May 4, 2014 6:32 AM in response to Loner T

    here it is

     

     

    Password:

    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: hybrid

      BSD: not present

      APM: not present

      GPT: present

     

     

    Found valid GPT with hybrid MBR; using GPT.

     

     

    Command (? for help): p

    Disk /dev/disk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 0000712E-572C-0000-B33C-000088620000

    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 386630829 sectors (184.4 GiB)

     

     

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

       1              40          409639   200.0 MiB   EF00  EFI system partition

       2          409640       393075783   187.2 GiB   AF00  Customer

       3       393075784       394345319   619.9 MiB   AB00  Recovery HD

       4       780976128       976773119   93.4 GiB    0700  BOOTCAMP

  • by Loner T,

    Loner T Loner T May 4, 2014 8:39 AM in response to KaiKaiser
    Level 7 (24,855 points)
    Safari
    May 4, 2014 8:39 AM in response to KaiKaiser

    Since this thread has your current GPT,

     

    The first two commands delete partition 4, 'n' creates a new partition 4, starting at a different start location, end sector is the same, type is Bootcamp, print it and write it.

     

    (Warning: You can lose data with the following steps).

     

    sudo gdisk /dev/disk0

    d

    4

    n

    4

    394345320

    976773119

    0700

    p

    w

     


  • by KaiKaiser,

    KaiKaiser KaiKaiser May 4, 2014 9:24 AM in response to Loner T
    Level 1 (0 points)
    May 4, 2014 9:24 AM in response to Loner T

    thanks sir, i'm gonna do this right away. i dont mind losing a bit of data as long as it could get it better than nothing i guess.

  • by KaiKaiser,

    KaiKaiser KaiKaiser May 4, 2014 9:40 AM in response to Loner T
    Level 1 (0 points)
    May 4, 2014 9:40 AM in response to Loner T

    Just did what you told me to, its still in disk0s4 but the size changed back to normal or rather became bigger than normal. But still the problem exist and it can't be mounted on diskutil.

  • by Loner T,

    Loner T Loner T May 4, 2014 10:43 AM in response to KaiKaiser
    Level 7 (24,855 points)
    Safari
    May 4, 2014 10:43 AM in response to KaiKaiser

    Your MBR (fdisk output) and GPT no longer match. The 780976128 needs to be 394345320 in MBR using fdisk -e. It may not mount after such a change, if there is any corruption, or if the NTFS volume information is not readable anymore, but may be worth the next step.

     

    Did you create a second volume  on the Windows side using some utility (you refer to X:)?

     

    4: 0C 1023 254  63 - 1023 254  63 [ 780976128 -  195796992] Win95 FAT32L

  • by KaiKaiser,

    KaiKaiser KaiKaiser May 4, 2014 10:53 AM in response to Loner T
    Level 1 (0 points)
    May 4, 2014 10:53 AM in response to Loner T

    No i didn't create a second volume, it just stated X: during the windows recovery console. And when i selected command prompt it showed that it was on X: not on C: even when i used Startup Repair, X: was used instead of C:

  • by Loner T,

    Loner T Loner T May 4, 2014 11:59 AM in response to KaiKaiser
    Level 7 (24,855 points)
    Safari
    May 4, 2014 11:59 AM in response to KaiKaiser

    Can you fix the MBR using fdisk -e, and then use Windows Recovery and run bootrec.exe /scanos and  post what it finds?

Previous Page 2 of 6 last Next