Can't Partition HD

Discussion in 'Mac Basics and Help' started by Failurbydesign, Nov 10, 2015.

  1. Failurbydesign macrumors regular

    Failurbydesign

    Joined:
    Jan 17, 2011
    Location:
    CA
    #1
    I'm trying to remove a partition and get back my drive, but i keep getting this error. Thoughts?
     

    Attached Files:

  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    Are you booted to that Patriot USB key?

    Open Terminal and run the two commands below then tell me the output of each.

    Which one are you trying to get rid of?

    Code:
    diskutil list
    Code:
    diskutil cs list
     
  3. whodatrr macrumors 6502a

    whodatrr

    Joined:
    Jan 12, 2004
    #3
    Yep, sometimes the Disk Utility GUI does haywire, especially if you're running El Cap. Command line is your friend.

     
  4. Failurbydesign thread starter macrumors regular

    Failurbydesign

    Joined:
    Jan 17, 2011
    Location:
    CA
    #4

    It was a boot camp partition, i didn't get rid of it the right way. No i did not boot into the drive. I'm trying get rid of the two smaller partitions seen in the picture below.
     

    Attached Files:

  5. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #5
    Before you do anything make sure you have a good backup because one wrong move here and your drive will not be bootable and all data will be gone. So don't blame me if this goes badly. :)

    Okay... follow these steps.

    First boot from the USB key then get into Terminal from the Utilities menu in recovery.

    Enter this command to turn off core storage for the main volume so we can later resize it. It takes a bit to finish.

    Code:
    diskutil cs revert /
    Now enter the following to unmount the disk.

    Code:
    diskutil unmountDisk /dev/disk0
    Now these two one after the other to remove the 16.8 and 122.9MB little partitions you want gone.

    Code:
    gpt remove -i 5 disk0
    Code:
    gpt remove -i 4 disk0
    Now you should be able to exit Terminal then use Disk Utility to expand the OS X volume to fill the disk.
     
  6. Failurbydesign thread starter macrumors regular

    Failurbydesign

    Joined:
    Jan 17, 2011
    Location:
    CA
    #6

    Thanks for the info, i booted to the installer usb i created, but this is what i get. Thoughts?
     

    Attached Files:

  7. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #7
    Hmm... do you need the data on the disk? Can we just wipe the whole drive and start over?

    If so, run this in Terminal while booted from the recovery key.

    Code:
    diskutil cs delete "OSX"
    That will wipe the OS partition. Then go to Terminal and in the erase tab select the disk itself at the top and format to Mac OS Extended (Journaled). That should get you back to a blank disk with one partition.
     
  8. Failurbydesign thread starter macrumors regular

    Failurbydesign

    Joined:
    Jan 17, 2011
    Location:
    CA
    #8

    Nah i got a back up! I'll give that a try and get back to you!
     

Share This Page