directly from the brain of Eike Bernhardt


OS X: Ignore USB Storage device temporarily

I needed to ignore an USB storage device, or at least disable the automount feature for it, because I wanted the USB device to be available for VirtualBox.
There does not seem to be an device-specific ignore functionality, but in my case it was enough to temporarily unload the USB storage kext:

sudo kextunload /System/Library/Extensions/IOUSBMassStorageClass.kext

This will disable all USB storage media temporarily!
When you are finished using the USB storage device in VirtualBox, shut it down, and then do a

sudo kextload /System/Library/Extensions/IOUSBMassStorageClass.kext

to restore the USB storage functionality.

Filed under: Mac Leave a comment
Comments (3) Trackbacks (0)
  1. Is there a way to disable automounting of USB volumes from the get go (without knowing volume name or UUID) ?
    The reason is that I want to NOT have OS X write any .Trash and .Whatever files onto a certain disk which I’m only going to use for reading (this is useful when trying to extract data from a broken disk where any writes will likely cause more trouble)

  2. You could try using which should do exactly what you need:
    “Disk Arbitrator is Mac OS X forensic utility designed to help the user ensure correct forensic procedures are followed during imaging of a disk device.”

  3. Found Disk-Arbitrator right after I posted the above and was going to come back to update, but didn’t get around to it. It’s perfect! Exactly what I wanted.

Cancel reply

No trackbacks yet.