Cannot remove former bootcamp partition

Discussion in 'macOS Sierra (10.12)' started by zerozoneice, Oct 1, 2016.

  1. zerozoneice macrumors regular

    Joined:
    Jun 26, 2013
    #1
    Hi all,
    i tried to install Win10 using bootcamp assistant in Sierra. To my surprise it didn't need an USB stick as before, but only had to point to the Windows ISO.

    Started the windows install and could not use the 400GB partition i created for bootcamp, for some reason.
    From this point on i started reformatting it, deleting it, recreating, etc....don't ask the steps because i can't remember.

    At this point i removed all other partitions created in the process but i'm left with a big 400GB chunk of something. I can format it to whatever i want, NTFS, FAT, Mac Journaled, etc...however i can't remove it and reuse the space (extend my other 1.6GB OSX partition).

    The drive is a Fusiondrive 2TB on an 27 iMac 5K Late 15. Below are screenshots taken from disk utility in recovery mode. How can i delete the 400GB partition and extend the existing OSX one? Basically revert to whatever was before initiating bootcamp install? Thanks!
     

    Attached Files:

  2. zerozoneice thread starter macrumors regular

    Joined:
    Jun 26, 2013
    #2
    bump?
    had 3 chats with apple support, got passed from a firstline guy to a senior adviser, who asked for a diskutil list output and said he needs to consult with engineering team...that was 2 days ago.

    I am willing to crack & rebuild the fusiondrive and install Sierra from scratch, but what the hell.....how do i do it?
    Somehow the 400GB partition got ejected from fusion and is seen as separate physical drive for some reason.

    And it so pisses me off that it became so damn complicated to install Win in bootcamp, GPT workarounds, re-format of partitions, etc etc.
     
  3. tomjleeds macrumors 6502

    Joined:
    Jul 19, 2004
    Location:
    Manchester, UK
    #3
    Hmm.

    I've had fun in the past with Disk Utility not wanting to do anything to any partition on a disk with a journaled file system. In this example it was an external USB disk, half used for storage and half for Time Machine. From what I could find at the time, it appeared to be a bug in Disk Utility rather than anything wrong with the disk or the way it was set up.

    Unfortunately I can't for the life of me remember how I got around it...it involved hoop-jumping, but I'm pretty sure I didn't have to format the whole disk. I'll try to remember to have a play with it later and come back to you.
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    Run each of these commands in Terminal and post up the output and I'll try and walk you through this. Also make sure you have a good backup before we start.

    Code:
    diskutil list
    
    diskutil cs list
     
  5. zerozoneice thread starter macrumors regular

    Joined:
    Jun 26, 2013
    #5
    /dev/disk0 (internal, physical):

    #: TYPE NAME SIZE IDENTIFIER

    0: GUID_partition_scheme *2.0 TB disk0

    1: EFI EFI 209.7 MB disk0s1

    2: Apple_CoreStorage Macintosh HD 1.6 TB disk0s2

    3: Apple_Boot Recovery HD 650.0 MB disk0s3

    4: EFI NO NAME 104.9 MB disk0s4

    5: Apple_HFS O 400.0 GB disk0s5


    /dev/disk1 (internal, physical):

    #: TYPE NAME SIZE IDENTIFIER

    0: GUID_partition_scheme *121.3 GB disk1

    1: EFI EFI 209.7 MB disk1s1

    2: Apple_CoreStorage Macintosh HD 121.0 GB disk1s2

    3: Apple_Boot Boot OS X 134.2 MB disk1s3


    /dev/disk2 (internal, virtual):

    #: TYPE NAME SIZE IDENTIFIER

    0: OSX +1.7 TB disk2

    Logical Volume on disk1s2, disk0s2

    5FB66511-68F7-4425-80FB-0C8D12E38E10

    Unencrypted Fusion Drive
    --- Post Merged, Oct 3, 2016 ---
    CoreStorage logical volume groups (1 found)

    |

    +-- Logical Volume Group B329760F-CF5F-4BD6-B701-28C99104E8EA

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

    Name: Macintosh HD

    Status: Online

    Size: 1711855501312 B (1.7 TB)

    Free Space: 253952 B (254.0 KB)

    |

    +-< Physical Volume C25E5350-6D2B-47A9-B914-ACA7EE7F062E

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

    | Index: 0

    | Disk: disk1s2

    | Status: Online

    | Size: 120988852224 B (121.0 GB)

    |

    +-< Physical Volume 0DD38F98-5DF6-4B9C-B070-9978AD724D0A

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

    | Index: 1

    | Disk: disk0s2

    | Status: Online

    | Size: 1590866649088 B (1.6 TB)

    |

    +-> Logical Volume Family 945CF081-8609-4E27-B888-A895BE7FFF72

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

    Encryption Type: None

    |

    +-> Logical Volume 5FB66511-68F7-4425-80FB-0C8D12E38E10

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

    Disk: disk2

    Status: Online

    Size (Total): 1705999990784 B (1.7 TB)

    Revertible: No

    LV Name: OSX

    Volume Name: OSX

    Content Hint: Apple_HFS

    LVG Type: Fusion, Sparse
    --- Post Merged, Oct 3, 2016 ---
    The "B" partition in the screenshots is now "O", as in disk0s5.
     
  6. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #6
    Again... make sure you are backed up if this goes south.

    command-option-r boot to Internet recovery (not command-r recovery). Then open Terminal from the Utilities menu and enter the following commands one by one.

    Code:
    diskutil unmountDisk disk0
    Code:
    gpt remove -i 5 disk0
    This should unmount the disk then remove the 400GB partition.

    Then run this to expand the Fusion drive.

    Code:
    diskutil cs resizeStack 5FB66511-68F7-4425-80FB-0C8D12E38E10 0g
    This should make the Fusion volume expand to fill all empty space.

    If this does not work, let me know and we will just wipe everything and rebuild the Fusion drive and restore. What are you using for backup?
     
  7. zerozoneice, Oct 3, 2016
    Last edited: Oct 3, 2016

    zerozoneice thread starter macrumors regular

    Joined:
    Jun 26, 2013
    #7
    nothing for backup. Saved my photo library and stuff to an external drive already.
    I'm gonna try the commands above and post back. Thx.

    edit: unmounted disk0 succesfully but could not remove via gpt command, says resource is in use. I assume it's talking about slice 5...
     
  8. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #8
    I never got a notification since you edited the post rather than a new post.

    Try this to unmount.

    Code:
    diskutil unmount force /dev/disk0s5
     
  9. zerozoneice thread starter macrumors regular

    Joined:
    Jun 26, 2013
    #9
    OK, here is the result: unable to remove, resource busy
     

    Attached Files:

  10. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #10
    Gah! Try doing the unmount on all the disks. Do this for 1, 2, and 3.

    Code:
    diskutil unmountDisk disk0
     
  11. Voenix Rising macrumors member

    Voenix Rising

    Joined:
    May 1, 2013
    #11
    I'm no expert on fusion drives, so take this for what it's worth...and proceed AYOR.

    Coming from my Windows experience, I can suggest that you download DBAN (Darik's Burn and Nuke) utility and put it on a DOS bootable USB stick or CD. Boot into that and run the utility (it will work on a Mac; I've done it--albeit only with a single drive). This should allow you to completely zero out your hard drive(s), letting you to do the internet recovery as described above.
     
  12. zerozoneice, Oct 5, 2016
    Last edited: Oct 5, 2016

    zerozoneice thread starter macrumors regular

    Joined:
    Jun 26, 2013
    #12
    nop. disk0s6 (yea, it's slice 6 now) still can't be removed via gpt command or force unmount, resource in use.
    all disks (0-4) can be unmounted
    --- Post Merged, Oct 5, 2016 ---
    i'm not sure how zero-ing out the drive can help removing this partition and resize the fusion drive...
     

    Attached Files:

  13. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #13
    I think it is time to just wipe it all and start over.

    Go back to Internet recovery then do this command in Terminal to wipe/break the Fusion volume.

    Code:
    diskutil cs delete "OSX"
    Then in Disk Utility you should now be able to see the individual physical drives. Go to the erase tab then select each drive at the top of the tree (above the partitions) and format to Mac OS Extended. That should leave you with two physical drives, each formatted to one large partition each.

    Then create the Fusion drive following my post #14 in this thread.

    Then reinstall the OS.
     
  14. zerozoneice, Oct 5, 2016
    Last edited: Oct 5, 2016

    zerozoneice thread starter macrumors regular

    Joined:
    Jun 26, 2013
    #14
    hmm, i tried once more to unmount and remove disk0s6 via gpt and it worked.
    it's gone now from diskutil list...
    what i did before this was to reformat the 400GB partition to NTFS using the Paragon NTFS applet in System Settings...

    the problem is that it's gone to hell, i cant see the space anywhere?!
    disk utility shows one single disk as 1.7TB (OSX) and no spare space to extend to..where are the 400GB gone? :)
    --- Post Merged, Oct 5, 2016 ---
    diskutil cs remove "OSX" spits out: OSX does not appear to be a valid core storage logical volume group uuid or name
    --- Post Merged, Oct 5, 2016 ---
    I used Macintosh HD for cs name and it worked
    --- Post Merged, Oct 5, 2016 ---
    Hmm if i create the fusion now, it will use disk0s2 which is the HDD part but it has 1.6GB according to diskutil list

    Nevermind, i quit terminal, entered diskutility and formatted/erased both ssd and hdd with macos journaled. The hdd finally shows 2tb ffs

    Now onto fusing them....
    SUCCESS!!!!
    I was never so glad to have destroyed all my data....:))

    MANY THANKS!!!
    Now.....Internet OSX install and tomorrow ill try bootcamp again...suicidal
    --- Post Merged, Oct 5, 2016 ---
    Crap it downloads El Capitan....should have kept my Sierra bootable USB
     
  15. Voenix Rising macrumors member

    Voenix Rising

    Joined:
    May 1, 2013
    #15
    It deletes the partition tables.
     
  16. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #16
    Yeah... Internet recovery installs the OS version that came from the factory. You can just install Sierra over top of it though.

    Glad you got it all fixed up. :)
     
  17. Voenix Rising macrumors member

    Voenix Rising

    Joined:
    May 1, 2013
    #17

    There are days I'd LOVE to go back to Lion (the version that came with my MBP), LOL.
     
  18. zerozoneice thread starter macrumors regular

    Joined:
    Jun 26, 2013
    #18
    just tried to clean install Win10 again....i got the same ****ing errors in windows setup that "we couldn't create a new partition...." when clicking "next". The partition is already selected, it's not called BOOTCAMP anymore, btw...

    I solved it with restoring to single partition again (via bootcamp), clear PRAM, do the bootcamp assistant again and it simply worked....wtf.
     

Share This Page