pranag

Q: update to Capitan corrupted bootcamp

Loner, (continuing from Re: Bootcamp gone haywire after Yosemite update)

I'm facing the same problem when I updated to OS X EI Capitan. Below is my setting

 

prashanths-MacBook-Pro:meanHelloWorld pranag$ sudo gdisk /dev/disk0

Password:

Sorry, try again.

Password:

GPT fdisk (gdisk) version 1.0.1

 

Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

NOTE: Write test failed with error number 1. It will be impossible to save

changes to this disk's partition table!

You may need to deactivate System Integrity Protection to use this program. See

https://www.quora.com/How-do-I-turn-off-the-rootless-in-OS-X-El-Capitan-10-11

for more information.

 

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): 0000136E-5E53-0000-413D-0000E64A0000

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 195508533 sectors (93.2 GiB)

 

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

   1              40          409639   200.0 MiB   EF00  EFI system partition

   2          409640       291229631   138.7 GiB   AF05  Macintosh HD

   3       291229632       292499167   619.9 MiB   AB00  Recovery HD

   4       488007680       976773119   233.1 GiB   0700  BOOTCAMP

 

Command (? for help): d

Partition number (1-4): 4

 

Command (? for help): n

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

 


 


I ran the test Disk and it gives the below selections


Select a media (use Arrow keys, then press Enter):

Disk /dev/disk0 - 500 GB / 465 GiB (RO)

>Disk /dev/rdisk0 - 500 GB / 465 GiB (RO)

Disk /dev/rdisk1 - 148 GB / 138 GiB (RO)

 



I selected rdisk0


Below is what it shows


Write access for this media is not available.

TestDisk won't be able to modify it.

 

- No partition from this disk must be mounted:

Open the Disk Utility (In Finder -> Application -> Utility folder)

and press Unmount button for each volume from this disk

- This media may be physically write-protected, check the jumpers.

 

 

 

 

 

>[ Continue ] Continue even if write access isn't available

[ Quit     ] Return to disk selection



What do I do?

 

MacBook Pro, iOS 9.1

Posted on Nov 29, 2015 9:06 AM

Close

Q: update to Capitan corrupted bootcamp

  • All replies
  • Helpful answers

Page 1 Next
  • by pranag,

    pranag pranag Nov 29, 2015 9:18 AM in response to pranag
    Level 1 (0 points)
    Nov 29, 2015 9:18 AM in response to pranag

    I have also tried this

     

    prashanths-MacBook-Pro:meanHelloWorld pranag$ diskutil list

    /dev/disk0 (internal, physical):

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *500.1 GB   disk0

       1:                        EFI EFI                     209.7 MB   disk0s1

       2:          Apple_CoreStorage Macintosh HD            148.9 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data                         250.2 GB   disk0s4

    /dev/disk1 (internal, virtual):

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:                  Apple_HFS Macintosh HD           +148.5 GB   disk1

                                     Logical Volume on disk0s2

                                     5C26B20B-AC1B-42B4-BB4F-A5F881F132E7

                                     Unencrypted

    prashanths-MacBook-Pro:meanHelloWorld pranag$ sudo fdisk -e /dev/disk0

    Password:

    fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory

    Enter 'help' for information



  • by Loner T,

    Loner T Loner T Nov 29, 2015 9:49 AM in response to pranag
    Level 7 (23,813 points)
    Safari
    Nov 29, 2015 9:49 AM in response to pranag

    Please post the output of

     

    diskutil list

    diskutil cs list

    sudo gpt -vv -r show /dev/disk0

    sudo fdisk /dev/disk0

  • by pranag,

    pranag pranag Nov 29, 2015 9:51 AM in response to Loner T
    Level 1 (0 points)
    Nov 29, 2015 9:51 AM in response to Loner T

    below is the output

     

     

    prashanths-MacBook-Pro:meanHelloWorld pranag$ diskutil list

    /dev/disk0 (internal, physical):

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *500.1 GB   disk0

       1:                        EFI EFI                     209.7 MB   disk0s1

       2:          Apple_CoreStorage Macintosh HD            148.9 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data                         250.2 GB   disk0s4

    /dev/disk1 (internal, virtual):

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:                  Apple_HFS Macintosh HD           +148.5 GB   disk1

                                     Logical Volume on disk0s2

                                     5C26B20B-AC1B-42B4-BB4F-A5F881F132E7

                                     Unencrypted

    prashanths-MacBook-Pro:meanHelloWorld pranag$ diskutil cs util

    diskutil: did not recognize coreStorage verb "util"; type "diskutil coreStorage" for a list

    prashanths-MacBook-Pro:meanHelloWorld pranag$ diskutil cs list

    CoreStorage logical volume groups (1 found)

    |

    +-- Logical Volume Group 8CB1DC8C-FB58-4887-A957-F4A666443FC5

        =========================================================

        Name:         Macintosh HD

        Status:       Online

        Size:         148899835904 B (148.9 GB)

        Free Space:   18952192 B (19.0 MB)

        |

        +-< Physical Volume 6B5F3969-D630-43D2-BE8D-86C9B2715DB9

        |   ----------------------------------------------------

        |   Index:    0

        |   Disk:     disk0s2

        |   Status:   Online

        |   Size:     148899835904 B (148.9 GB)

        |

        +-> Logical Volume Family 6D6511EA-B730-4901-ABDA-A844EC730B20

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

            Encryption Type:         None

            |

            +-> Logical Volume 5C26B20B-AC1B-42B4-BB4F-A5F881F132E7

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

                Disk:                  disk1

                Status:                Online

                Size (Total):          148528562176 B (148.5 GB)

                Revertible:            Yes (no decryption required)

                LV Name:               Macintosh HD

                Volume Name:           Macintosh HD

                Content Hint:          Apple_HFS

    prashanths-MacBook-Pro:meanHelloWorld pranag$ sudo gpt -vv -r show /dev/disk0

    Password:

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

    gpt show: /dev/disk0: Suspicious MBR at sector 0

    gpt show: /dev/disk0: Pri GPT at sector 1

    gpt show: /dev/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  290819992      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC

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

      292499168  195508512        

      488007680  488765440      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      976773120         15        

      976773135         32         Sec GPT table

      976773167          1         Sec GPT header

    prashanths-MacBook-Pro:meanHelloWorld pranag$ sudo fdisk /dev/disk0

    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: AC 1023 254  63 - 1023 254  63 [    409640 -  290819992] <Unknown ID>

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

    4: 0C 1023 254  63 - 1023 254  63 [ 488007680 -  488765440] Win95 FAT32L

    prashanths-MacBook-Pro:meanHelloWorld pranag$


    Thanks

  • by Loner T,

    Loner T Loner T Nov 29, 2015 9:56 AM in response to pranag
    Level 7 (23,813 points)
    Safari
    Nov 29, 2015 9:56 AM in response to pranag

    The large gap between GPT3 and GPT4 contains a lost NTFS header. Use Testdisk Quick Search to get the list of recoverable partitions.

  • by pranag,

    pranag pranag Nov 29, 2015 10:07 AM in response to Loner T
    Level 1 (0 points)
    Nov 29, 2015 10:07 AM in response to Loner T

    it gives me the below output

     

    Disk /dev/disk0 - 500 GB / 465 GiB - 976773168 sectors (RO)

     

    The harddisk (500 GB / 465 GiB) seems too small! (< 850 GB / 792 GiB)

    Check the harddisk size: HD jumpers settings, BIOS detection...

     

    The following partitions can't be recovered:

         Partition               Start        End    Size in sectors

    >  MS Data                976773119 1661046775  684273657

       Mac HFS                976773124  978042659    1269536


    What do I do?


    Thanks

  • by Loner T,

    Loner T Loner T Nov 29, 2015 10:31 AM in response to pranag
    Level 7 (23,813 points)
    Safari
    Nov 29, 2015 10:31 AM in response to pranag

    These are unrecoverable partitions. Press Enter/Return to Continue. The next screen should give you list of recoverable partitions.

  • by pranag,

    pranag pranag Nov 29, 2015 10:36 AM in response to Loner T
    Level 1 (0 points)
    Nov 29, 2015 10:36 AM in response to Loner T

    Screen Shot 2015-11-29 at 12.35.09 PM.png

    How do I proceed?

    Thanks

  • by Loner T,

    Loner T Loner T Nov 29, 2015 10:40 AM in response to pranag
    Level 7 (23,813 points)
    Safari
    Nov 29, 2015 10:40 AM in response to pranag

    Use 'p' to list files in the MS Data entries and post a screen shot. You should see something similar to...

     

    Testdisk-GoodWindowsPartition.png

  • by pranag,

    pranag pranag Nov 29, 2015 10:47 AM in response to Loner T
    Level 1 (0 points)
    Nov 29, 2015 10:47 AM in response to Loner T

    Screen Shot 2015-11-29 at 12.44.31 PM.png

    Screen Shot 2015-11-29 at 12.44.46 PM.png

    Screen Shot 2015-11-29 at 12.44.58 PM.png

    Screen Shot 2015-11-29 at 12.45.10 PM.png

     

    Thanks

  • by pranag,

    pranag pranag Nov 29, 2015 11:08 AM in response to pranag
    Level 1 (0 points)
    Nov 29, 2015 11:08 AM in response to pranag

    How do I go from here?

    Do I use this command? do I have the correct numbers?

    sudo gdisk /dev/disk0

    p

    d

    4

    n

    4

    292499456

    684273657

    0700

    p

    w

    y



  • by pranag,

    pranag pranag Nov 29, 2015 11:13 AM in response to Loner T
    Level 1 (0 points)
    Nov 29, 2015 11:13 AM in response to Loner T

    How do I go from here?

    Do I use this command? do I have the correct numbers?

    sudo gdisk /dev/disk0

    p

    d

    4

    n

    4

    292499456

    684273657

    0700

    p

    w

    y


  • by Loner T,Solvedanswer

    Loner T Loner T Nov 29, 2015 12:03 PM in response to pranag
    Level 7 (23,813 points)
    Safari
    Nov 29, 2015 12:03 PM in response to pranag

    pranag wrote:

     

    How do I go from here?

    Do I use this command? do I have the correct numbers?

    sudo gdisk /dev/disk0

    p

    d

    4

    n

    4

    292499456

    +684273657

    0700

    p

    w

    y


    You need to use a "+" sign to indicate offset, not absolute end position. This will rebuild only the GPT. You will also need to rebuild the MBR once the GPT is corrected.

     

    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: 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 pranag,

    pranag pranag Nov 29, 2015 11:34 AM in response to Loner T
    Level 1 (0 points)
    Nov 29, 2015 11:34 AM in response to Loner T

    it says


    Unable to open device '/dev/disk0' for writing! Errno is 1! Aborting write!


    when I do


    sudo gdisk /dev/disk0

    p

    d

    4

    n

    4

    292499456

    +684273657

    0700

    p

    w

    y



    what do I do?


    I'm trying this which I got from one of your earlier posts


    You have ELC System Integrity enabled.

     

    1. Boot into Local Recovery.

    2. In Utilities -> Terminal type

         csrutil disable

    3. Boot normally.

    4. Execute Gdisk steps and test and verify.

    5. Repeat Step 1 and type

         csrutil enable

     

     



  • by pranag,

    pranag pranag Nov 29, 2015 12:05 PM in response to Loner T
    Level 1 (0 points)
    Nov 29, 2015 12:05 PM in response to Loner T

    Thanks.. this got solved now...

Page 1 Next