MacOS – Mount and repair external hard drive with command line tools

disk-utilitymacmacbook promacosterminal

Is it possible to force-mount an external Fujitsu hard drive with command line tools, if it can't be mounted using Disk Utility? Whether it doesn't matter? I ask because this is not my Mac and at the moment I don't have it

I have an error message the disk 'name of the disk' could not be mounted

Info: MacBook Pro/OS X Yosemite

Another question: Can I repair this disk through command line tools?

I have an error like this exit code 8 something with filesystem and error using Disk Utility:

Error: Disk utility can’t repair this disk. backup as many of your files as possible

Best Answer

Yeah, if Disk Utility is telling you it's time to backup and erase then it's not looking good. Perhaps other disk repair utilities can help? But you might just want to heed the warning and backup and erase. :)

You can force unmount volumes but you can't force mount them. Using the command line, get the device name:

diskutil list

In my case, it's disk2:

diskutil mountDisk /dev/disk2

Or:

diskutil mount /dev/disk2s2

You can run a repair like in Disk Utility, in this case you'll want to include the slice number (disk2s2):

diskutil repairVolume /dev/disk2s2