3

All the way through El Capitan, the way this used to work, in the Terminal, was:

sudo kextunload /System/Library/Extensions/IOUSBMassStorageClass.kext
sudo mv /System/Library/Extensions/IOUSBMassStorageClass.kext ~/backup
sudo touch /System/Library/Extensions/
sudo reboot

In Sierra and High Sierra, it appears that the IOUSBMassStorageClass kernel extension is no longer loaded, and instead, the IOUSBMassStorageDriver is loaded. Running kextstat | grep USBMass reveals this. If I try to unload the IOUSBMassStorageClass kernel extension, I get the following error:

(kernel) Can't remove kext com.apple.iokit.IOUSBMassStorageDriver; services failed to terminate - 0xdc008018. Failed to unload com.apple.iokit.IOUSBMassStorageDriver - (libkern/kext) kext is in use or retained (cannot unload).

Some additional pieces of information:

  1. This workstation is a standalone machine, and is not part of a macOS Server-managed installation. As such, I do not have access to Profile Manager. However, if I can install server somewhere else, export a profile, and load it to this workstation in the Terminal, that is an acceptable solution.

  2. Use of a third-party endpoint manager application is prohibited.

  3. This workstation is remote, and so physical access to it is not an option. The preferred method of configuration is in Terminal through ssh. Remote Desktop is available, if need be.

  4. I have verified that System Integrity Protection has been disabled on this workstation.

Thanks in advance!

1
  • does anyone get any solutions? I tried kextunload -b com.apple.iokit.IOUSBMassStorageDriver on Mojave, but the same error keeps occurring. – allenwang Jan 30 '19 at 2:40
1

According to this thread it seems like is an Apple problem since MacOS Sierra. Several users reported this problem and even a bug report has been generated.

Hope this can help you.

1
  • Thanks LvcasX1 - I had come across this page while I was researching the issue. I was hopeful that someone in the community may be aware of a solution? – Ned W. Feb 27 '18 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .