m0ng

Q: Partition pain

I was trying to free up some space from my windows 10 partition to go back to my Mac OS X 10.10.2 partition. You used to be able to do this in either boot amp or the disk utility just by dragging the sliders, I'm sure...i couldn't get it to work in Mac I looked online and read somewhere that Windows 10 could do it natively.

 

In Windows 10 disk management o resized the bootcamp partition to free up some space. This then created an empty partition, so I headed back to OS X, but it didn't seem to see it in disk utility, aback to Windows 10, I thought if I formatted it as fat32 os X would see it and be able to reclaim the space.

 

That's when the sh*t hit the fan:

 

-cant boot into os X

-cant boot into Windows 10

 

when booting the screen is black for a long time then the machine tries to book Windows but says there's no bootable media (or something similar).

 

I tries command + R to load online help/utilities but disk utility their recognises all the partitions but cannot seem to do anything with them, like delete or repair etc. It says it can't make changes to the boot map (apologies not exact mssage(s) have subsequntly been drinking to numb the misery of it. Am away from home, so don't have any bootable media Or any backups with me.

 

basically I've broken the guild map I think but because everything's greyed out in the utilises, I can't erase any partitions (if that's what I need to do).

 

would someone please give me some advice? - will it be possible to save the data on the os X partition? (Not so bothers about Windows 10)???

 

thanks in advance

 

david

 

Macbook pro retina 15inch 2012

Posted on Dec 28, 2015 9:10 PM

Close

Q: Partition pain

  • All replies
  • Helpful answers

first Previous Page 5 of 6 last Next
  • by m0ng,

    m0ng m0ng Dec 31, 2015 9:15 PM in response to Loner T
    Level 1 (62 points)
    iPhone
    Dec 31, 2015 9:15 PM in response to Loner T

    here we are:

     

    Last login: Fri Jan  1 05:12:28 on ttys000

    davids-MacBook-Pro:~ m0ng$ sudo gpt -vv -r show /dev/disk0

    gpt show: /dev/disk0: mediasize=500277790720; sectorsize=512; blocks=977105060

    gpt show: /dev/disk0: PMBR at sector 0

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

    gpt show: /dev/disk0: Sec GPT at sector 977105059

          start       size  index  contents

              0          1         PMBR

              1          1         Pri GPT header

              2         32         Pri GPT table

             34       2014        

           2048     407592      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

         409640       2008        

         411648  701986336      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      702397984        480        

      702398464    1269056      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

      703667520        704        

      703668224  273436672      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      977104896        131        

      977105027         32         Sec GPT table

      977105059          1         Sec GPT header

    davids-MacBook-Pro:~ m0ng$

  • by Loner T,Helpful

    Loner T Loner T Jan 1, 2016 5:37 PM in response to m0ng
    Level 7 (24,611 points)
    Safari
    Jan 1, 2016 5:37 PM in response to m0ng

    If you look at Re: Partition pain, there is a message

    Partitions will be aligned on 8-sector boundaries

    If you compare https://discussions.apple.com/servlet/JiveServlet/showImage/2-29553938-662192/00 3.jpg and compare it to

     

    m0ng wrote:

     

    here we are:

     

    Last login: Fri Jan  1 05:12:28 on ttys000

    davids-MacBook-Pro:~ m0ng$ sudo gpt -vv -r show /dev/disk0

    gpt show: /dev/disk0: mediasize=500277790720; sectorsize=512; blocks=977105060

    gpt show: /dev/disk0: PMBR at sector 0

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

    gpt show: /dev/disk0: Sec GPT at sector 977105059

          start       size  index  contents

              0          1         PMBR

              1          1         Pri GPT header

              2         32         Pri GPT table

             34       2014       

           2048     407592      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

         409640       2008       

         411648  701986336      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      702397984        480       

      702398464    1269056      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

      703667520        704       

      703668224  273436672      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      977104896        131       

      977105027         32         Sec GPT table

      977105059          1         Sec GPT header

    davids-MacBook-Pro:~ m0ng$

    You can see the issue. The start/end must match exactly.

     

    Please redo the GPT after you change the sector alignment to 1 sector as shown...

     

    sudo gdisk /dev/disk0

    Password:

    GPT fdisk (gdisk) version 1.0.0

     

    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!

     

    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: 500118192 sectors, 238.5 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 22749ACF-207D-458E-B255-5DF02C39DC2D

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 500118158

    Partitions will be aligned on 8-sector boundaries

    Total free space is 1325 sectors (662.5 KiB)

     

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

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640       250801735   119.4 GiB   AF05  OSY-MBP13

       3       250801736       252071271   619.9 MiB   AB00  Recovery HD

       4       252071936       500117503   118.3 GiB   0700  BOOTCAMP

     

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

    Enter the sector alignment value (1-65536, default = 2048): 1

     

    Expert command (? for help): p

    Disk /dev/disk0: 500118192 sectors, 238.5 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 22749ACF-207D-458E-B255-5DF02C39DC2D

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 500118158

    Partitions will be aligned on 1-sector boundaries

    Total free space is 1325 sectors (662.5 KiB)

     

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

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640       250801735   119.4 GiB   AF05  OSY-MBP13

       3       250801736       252071271   619.9 MiB   AB00  Recovery HD

       4       252071936       500117503   118.3 GiB   0700  BOOTCAMP

     

    Expert command (? for help):

     

     

  • by m0ng,

    m0ng m0ng Dec 31, 2015 10:10 PM in response to Loner T
    Level 1 (62 points)
    iPhone
    Dec 31, 2015 10:10 PM in response to Loner T

    Im so sorry, which one is the correct values? Im so tired, I just want to get this bit done and then I need to sleep.

  • by m0ng,

    m0ng m0ng Dec 31, 2015 10:13 PM in response to m0ng
    Level 1 (62 points)
    iPhone
    Dec 31, 2015 10:13 PM in response to m0ng

    and how to do i get back to where i can input the values? (sorry, hand holding i know)

  • by Loner T,Solvedanswer

    Loner T Loner T Jan 1, 2016 5:37 PM in response to m0ng
    Level 7 (24,611 points)
    Safari
    Jan 1, 2016 5:37 PM in response to m0ng

    Please verify all values for typos.

     

    1. Create a new GPT.

    2. x (Experts menu)

    3. l (Alignment)

    4. 1 (1 sector)

    5. m (Main Menu)

    6. n (New)

    7. 1 (GPT #1)

    8. 40 (Start)

    9. 409639 (End)

    10. EF00 (EFI)

    11. n (new)

    12. 2 (GPT#2)

    13. 409640 (Start)

    14. 702397983 (End)

    15. AF00 (OSX)

    16. n (New)

    17. 3 (GPT#3)

    18. 702397984 (Start)

    19. 703667519 (End)

    20. AB00 (Recovery HD)

    21. n (New)

    22. 4 (GPT#4)

    23. 703668224 (Start)

    24. 977104985 (End)

    25. 0700 (NTFS)

    26. p

    27. w

    28. y

     

    Reboot and check OS X and Windows partitions. Try to boot from internal disk OS. Windows is not ready yet.

  • by m0ng,

    m0ng m0ng Dec 31, 2015 10:42 PM in response to Loner T
    Level 1 (62 points)
    iPhone
    Dec 31, 2015 10:42 PM in response to Loner T

    sorry i'm trying your patience but "

    3. l (Alignment)

    4. 1 (1 sector)

     

    doesn't seem to appear in my menus, perhaps i have a newer version and its in a different place?

  • by m0ng,

    m0ng m0ng Dec 31, 2015 10:44 PM in response to m0ng
    Level 1 (62 points)
    iPhone
    Dec 31, 2015 10:44 PM in response to m0ng

    davids-MacBook-Pro:~ m0ng$ sudo gdisk /dev/disk0

    GPT fdisk (gdisk) version 1.0.1

     

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

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

    Partition number (1-4): 1

    Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI System)

    Partition unique GUID: 3DA938A3-C534-41B1-B0CE-5A15F4022CF1

    First sector: 2048 (at 1024.0 KiB)

    Last sector: 409639 (at 200.0 MiB)

    Partition size: 407592 sectors (199.0 MiB)

    Attribute flags: 0000000000000000

    Partition name: 'EFI System'

     

    Expert command (? for help):

  • by m0ng,

    m0ng m0ng Dec 31, 2015 10:48 PM in response to m0ng
    Level 1 (62 points)
    iPhone
    Dec 31, 2015 10:48 PM in response to m0ng

    it keeps changing the start points of the sectors:

     

    nformation: Moved requested sector from 409640 to 411648 in

    order to align on 2048-sector boundaries.

  • by Loner T,

    Loner T Loner T Dec 31, 2015 10:51 PM in response to m0ng
    Level 7 (24,611 points)
    Safari
    Dec 31, 2015 10:51 PM in response to m0ng

    m0ng wrote:

     

    sorry i'm trying your patience but "

    3. l (Alignment)

    4. 1 (1 sector)

     

    doesn't seem to appear in my menus, perhaps i have a newer version and its in a different place?

    It is right here...

     

    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

  • by m0ng,

    m0ng m0ng Dec 31, 2015 10:58 PM in response to Loner T
    Level 1 (62 points)
    iPhone
    Dec 31, 2015 10:58 PM in response to Loner T

    Disregard the last 2 or 3 panicked posts of mine. I really ought to poke about before flapping my mouth. I have sorted it out now. The Macintosh HD has now mounted in finder and i can see my data.

     

    Im so sorry i'm handful. I apologise profusely.

     

    Going to try reboot to internal drive now. brb!

  • by m0ng,

    m0ng m0ng Dec 31, 2015 11:04 PM in response to Loner T
    Level 1 (62 points)
    iPhone
    Dec 31, 2015 11:04 PM in response to Loner T

    Boot from internal mac hdd successful! I am so happy I have my data back!!! You're a saintg

     

    As you said, the bootcamp/windows drive still does not show in the drive list when pressinh option/alt at boot up. Is there anything that can be done?

  • by Loner T,

    Loner T Loner T Dec 31, 2015 11:08 PM in response to m0ng
    Level 7 (24,611 points)
    Safari
    Dec 31, 2015 11:08 PM in response to m0ng

    Can you see Bootcamp volume in OS X Finder? Please post a screen shot of the Finder window with BC files from the OS X Side.

     

    The following command will show the header of the BC volume.

     

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

  • by m0ng,

    m0ng m0ng Dec 31, 2015 11:17 PM in response to Loner T
    Level 1 (62 points)
    iPhone
    Dec 31, 2015 11:17 PM in response to Loner T

    is this what you mean?

     

    bc screenshot.jpg

     

    getinfobootcamp.jpg

  • by m0ng,

    m0ng m0ng Dec 31, 2015 11:21 PM in response to Loner T
    Level 1 (62 points)
    iPhone
    Dec 31, 2015 11:21 PM in response to Loner T

    terminal bootcamp.jpg

  • by Loner T,

    Loner T Loner T Dec 31, 2015 11:27 PM in response to m0ng
    Level 7 (24,611 points)
    Safari
    Dec 31, 2015 11:27 PM in response to m0ng

    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? (This works)

    Test 2 - Can you see files in Bootcamp Volume? (This works)

    Test 3 - Can you select Bootcamp in System Preferences -> Startup Disk?

    Test 4 - If Test 3 is successful, select Bootcamp and Click Restart.

     

    If all looks normal, please back up OS X, Windows and create Windows System Restore point.

first Previous Page 5 of 6 last Next