OS X: Mount disks as read only or block automounting altogether #

Aaron Burghardt's open source Disk Arbitrator provides a simple GUI for changing OS X's automount behavior. Automounting can be disabled completely (especially handy for drive imaging / data recovery via ddrescue, etc) or mounts can be forced as read-only (for forensics, etc, though a hardware write-blocker is still recommended).

Disk Arbitrator

This little app replaces the following hacks I've been using to prevent automounting of USB / Firewire drives in OS X:

Updates

  1. Aaron kindly replied to my email, pointing out that the "stop" command (since removed) isn't necessary in the fourth method above and that pausing/resuming diskarbitrationd with SIGSTOP and SIGCONT offers another option (though it too disables diskutil):

       $ sudo launchctl list | grep diskarbitrationd
       188 -   com.apple.diskarbitrationd
       $ sudo kill -SIGSTOP 188 # pauses diskarbitrationd, disabling automount
       $ sudo kill -SIGCONT 188 # resumes diskarbitrationd, reenabling automount
    
  2. More on disabling Disk Arbitration from Apple Examiner.

  3. Mount USB drives as read-only in Windows

  4. As of mid 2024, Disk Arbitrator development has been stalled for a number of years; see Aaron Beckley's fork with patches to allow compiling under macOS 14.5 and Xcode 15.4.

/mac | Aug 17, 2010


Subscribe or visit the archives.