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.

4 thoughts on “OS X: Ignore USB Storage device temporarily

  1. Dude

    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)

    Reply
  2. Dude

    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.
    Cheers!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *