Whitelist disks to mount in Mac OS X

3

2

Is it possible to make a white list of disks to mount? I have multiple systems on multiple drives and I would prefer not to mount everything all the time. I can unmount it afterwards, but that is not just as elegant.

I would imagine some magic in com.apple.boot.plist or something.

Mikulas Dite

Posted 2012-06-16T19:35:07.217

Reputation: 495

Answers

2

The recommended method I found indicates you should use entries like the following in your /etc/fstab file to prevent mounting:

UUID=FAB060E9-79F7-33FF-BE85-E1D3ABD3EDEA  none     hfs    rw,noauto

As I understand it, entries for known discs will be treated preferentially by their fstab entry over any automount/other behaviors.

Also, according to the linked information, you should be able to use the following to determine disk/partition UUIDs:

diskutil info /path/to/disk

On hindsight, this isn't really a "whitelist" operation so much as a "blacklist" operation, but it is the only solution I can think of.

killermist

Posted 2012-06-16T19:35:07.217

Reputation: 1 886

Awesome finding, I actually did not believe it is possible. Thanks, awarding the bounty as soon as it's ready. – Mikulas Dite – 2012-06-20T07:35:50.367