7

This is the output in Disk Utility:

Disk Utility cannot modify this disk because it contains CoreStorage physical volumes. Use command line distil instead.

The selected partition won't be changed.

How do I remove the partition?

It's completely empty now and I've cleared it by formatting it but I want to completely remove the partition and merge the free space back into the bigger partition.

I've tried doing this but it doesn't work in Terminal:

diskutil eraseVolume format name device

diskutil eraseVolume HFS+ awer disk1s4

It didn't work:

Started erase on disk1s4 asdf

Unmounting disk

Error: -69879: Couldn't open disk
1
  • From which partition are you trying to remove the partition (i.e. Did you boot from the same disk or are you booted from the installation disk)? Commented Sep 2, 2011 at 7:39

5 Answers 5

3

Never mind - problem solved.

Turns out that the whole drive's partition table cannot be modified if one partition has encryption on, since CoreStorage is on. (The one that I had on was the encrypt feature for Time Machine.)

1
  • 7
    So how did you find which partition is encrypted, and how do you remove the encryption?
    – Adam Davis
    Commented Dec 16, 2011 at 2:18
2

I had this same issue a few days ago, Go back into disk Utility and use the erase option rather than the Partition option. So select the drive you want to get rid off and select erase. Hope this helps Disk Utility

1

I was trying to securely erase a Mac SSD which I mounted with Target Mode (restart, hold down T, connect two Macs with Thunderbolt cable-- now your target computer just shows up as an external drive) using the commands from https://lifehacker.com/how-to-securely-erase-a-solid-state-drive-on-mac-os-x-1580603733 -- which are to overwrite all data twice, using Terminal:

diskutil randomDisk 2 /dev/diskN 

(btw, diskN means what number of disk, like disk0 disk1, etc. -- to find out your number, do

diskutil list

first)

Doing that erase I got that same error number as OP. What I did to resolve it was go in to Disk Utility in my host computer then erase the contents of the connected drive that way. It objected and said there was an error. When I went back to terminal the "virtual" and unencrypted disk2 was gone, but I reran the erase command and now it's going.

Perhaps that might help with someone having partition issues.

1

As pointed out by JFW, the error is raised when trying to erase a CoreStorage encrypted device (e.g., encrypted by Time Machine). If you want to erase the whole drive you can solve the error on the terminal by:

diskutil cs list

Now find the Logical Volume Group' lvgUUID (the long hex number) that you want to erase. Re-check that all volumes in this group are safe to be deleted. If so you can delete the volume group with

diskutil cs delete lvgUUID

The disk will be erased, formatted as HFS Plus volume and re-mounted. You can use Disk Utility as usual to change the format.

0

I have a SanDisk 128GB USB stick. I had written Linux ISOs to it using dd. It had 3 tiny (<100MB) partitions and 1 big partition. One of the tiny ones was formatted as MS-DOS (FAT). The big one and the other two tiny ones were unknown, probably. I failed to take screen shots, sorry.

In any case, the GUI app Disk Utility gave me the 69879 error while attempting to erase or format any of the partitions and the plus and minus buttons were grayed out in the partition screen. I could not do any erase or partition operation on this USB stick.

The last two entries to diskutil list was:

/dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *123.0 GB   disk4
   1:       Microsoft Basic Data                         5.2 GB     disk4s1
   2:                        EFI ESP                     5.1 MB     disk4s2
   3:       Microsoft Basic Data                         307.2 KB   disk4s3
   4:           Linux Filesystem                         117.9 GB   disk4s4

/dev/disk5 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +12.9 GB    disk5
   1:                        EFI EFI                     209.7 MB   disk5s1
   2:                  Apple_HFS Shared Support          12.6 GB    disk5s2

And I was very surprised to see a disk5 at all. I assume it was the ISO images on the USB stick. Maybe that is the reason the GUI app Disk Utility would not let me perform an erase or partition operation? I don't know. I never found out. This is what I did.

I ran:

diskutil unmountDisk /dev/disk5

Output was:

Unmount of all volumes on disk5 was successful

I ran:

diskutil unmountDisk /dev/disk4

Output was:

Unmount of all volumes on disk4 was successful

I ran:

diskutil eraseDisk HFS+ installstick disk4 

Output was:

Started erase on disk4
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk4s2 as Mac OS Extended with name installstick
Initialized /dev/rdisk4s2 as a 114 GB case-insensitive HFS Plus volume
Mounting disk
Finished erase on disk4

And now this is what Disk Utility shows.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .