Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yashkumaratri/ac884c233192f3f6bb9b8c2d9f7bcdb2 to your computer and use it in GitHub Desktop.
Save yashkumaratri/ac884c233192f3f6bb9b8c2d9f7bcdb2 to your computer and use it in GitHub Desktop.
Repairing damaged external drive (flash drive) on OS X
# If "Disk Utility" can't erase a demaged disk and throw errors, like these:
# a) "-69888: Couldn't unmount disk";
# b) "Couldn't modify partition map".
# You can repair disk (if it is damaged partially, just by a program error, while changing partition map of a disk in) by
# FULL ERASING OF A DISK - you can do that ONLY in A COMMAND LINE, using "diskutil" command (on OS X)
# 1. Firstly you must get path of a drive in a system, like this:
diskutil list
# Than complete erasing of a disk:
diskutil eraseDisk free EMPTY /dev/disk4
# where "/dev/disk4" is a disk path, gotten on a previous step!
#For more information, you can look to the source of a method: https://discussions.apple.com/thread/8132218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment