I accidentally performed a 7 pass erase on my usb drive, and I don't want to wait that long time so I forced quit the Disk Utility. However, after doing that I found out that my disk is kind of unusable. I couldn't format it nor could I erase it since it would give me the error

Error: -69888: Couldn't unmount disk

Below is the information of my usb drive right now, what should I do to make this usb usable again?enter image description here

  • Did you try unplugging your USB and plugging it in again? Or rebooting your system? If not try that. Either will do but rebooting is probably safer. Then run diskutil list from terminal and edit results into your question if it still doesn't work. – lx07 Feb 15 '20 at 21:33
  • Yes I have tried all of that, and it didn't work. I can see the drive in disk utility. and I have tried diskutil eraseVolume disk2 and diskutil fdisk -iy disk2 and nothing works. I can neither mount it nor erase it since it wouldn't unmount – Katherine Elyon Feb 15 '20 at 21:40
  • 1
    Your picture is disk2s2 (the partition) not disk2 (the physical disk). You could try something like diskutil eraseVolume JHFS+ WhateverName disk2s2 (or /Volumes/disk2s2 but not disk2). Please add results of diskutil list to be sure. – lx07 Feb 15 '20 at 21:51
  • OMG that worked! Thank you BTW what does JHFS+ mean? Also the name is because after I force quit the disk utility, the name of the entire drive just changed to disk2s2. I thought it is just a name that stands for the physical disk. – Katherine Elyon Feb 15 '20 at 22:02

You needed to recreate a filesystem. You tried diskutil eraseVolume disk2 but this is invalid. See man diskutil or diskutil eraseVolume --help for details.

Firstly you need to tell diskutil what filesystem (if any) to use and secondly while in some odd cases (RAID for example) you create a filesystem on the whole physical disk normally it is on the partition. From your picture disk2 is the physical disk and disk2s2 is the partition so you want something like this:

diskutil eraseVolume JHFS+ WhateverName disk2s2 where :

  • JHFS+ is the filesystem you want (in this case journalled HFS+). Valid values can be seen by entering diskutil listFilesystems but from your picture it seems you had a HFS filesystem before.
  • WhateverName is the volume name you want (can be any valid characters, quoted if necessary)
  • disk2s2 is the partition you want to create the filesystem on.

What probably happened

From your picture disk2 is your physical USB drive. When you format a drive in Disk Utility macOS creates a small file called a partition table at the start (and if a GPT disk the end) of the disk. This file holds information showing where partitions are on the disk and their type. It will then normally create a small (invisible) 200MiB EFI partition (disk2s1) followed by one or more other partitions (disk2s2, disk2s3 etc) that you request.

In your case the second partition was a 256GB HFS partition. This was probably journalled HFS as it is the default, but not necessarily - the filesystem type code AF00 doesn't distinguish journalling. You can see from this support doc Apple recommends it in many cases.

When you started writing zeros to disk2s2 it destroyed the filesystem by overwriting it with zeros. The partition table entry showing the start, end and type (AF00) remained. Therefore creating a filesystem in the partition fixed it.

Note on cleaning

Overwriting 7 times with zeros is a massive overkill. Once is enough and more than that is a waste of time.

See this stackoverflow question: How does a 7- or 35-pass erase work? Why would one use these methods?

or this askubuntu question: Possibility of recovering files from a dd zero-filled hard disk

You must log in to answer this question.

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