So I spent most of the mornings searching google for how to prevent Mac OSX from automounting removable volumes to no avail. The closest people seem to have come is hard-coding volume UUIDs in fstab; which presents a chicken-and-egg problem: how do you find the volume UUID to blacklist without (inadvertently) mounting it?
The answer is close by in the code to an option another people seem to be searching for frequently - how to get OSX to mount removable volumes at boot time instead of at login. The global preference key AutomountDisksWithoutUserLogin
controls it, by setting several other hidden preference keys for diskarbitrationd
. See the code here.
The hidden pref keys are at this line:
DAMountDeferExternal
DAMountDeferInternal
DAMountDeferRemovable
DAMountTrustExternal
- `DA