Can't Partition HD

Weaselboy

Moderator
Staff member
Jan 23, 2005
30,346
10,117
California
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
 
  • Like
Reactions: Failurbydesign

whodatrr

macrumors 6502a
Jan 12, 2004
672
494
Yep, sometimes the Disk Utility GUI does haywire, especially if you're running El Cap. Command line is your friend.

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
 
  • Like
Reactions: Failurbydesign

Failurbydesign

macrumors regular
Original poster
Jan 17, 2011
132
1
CA
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

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.
 

Attachments

Weaselboy

Moderator
Staff member
Jan 23, 2005
30,346
10,117
California
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.
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.
 

Failurbydesign

macrumors regular
Original poster
Jan 17, 2011
132
1
CA
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.

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

Attachments

Weaselboy

Moderator
Staff member
Jan 23, 2005
30,346
10,117
California
Thanks for the info, i booted to the installer usb i created, but this is what i get. Thoughts?
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.
 

Failurbydesign

macrumors regular
Original poster
Jan 17, 2011
132
1
CA
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.

Nah i got a back up! I'll give that a try and get back to you!
 
  • Like
Reactions: Weaselboy
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.