Skip to main content
2 of 4
deleted 10 characters in body
sunknudsen
  • 982
  • 10
  • 21

This is how I disable auto mounting of APFS volumes on macOS Catalina.

For macOS volumes, both Macintosh HD - Data and Macintosh HD type volumes need to be referenced in /etc/fstab.

Find volume(s) using diskutil list and set VOLUME_PATH accordingly.

# Disable auto mounting of "macOS - Data" volume
VOLUME_PATH="/Volumes/macOS - Data"
VOLUME_UUID=`diskutil info "$VOLUME_PATH" | awk '/Volume UUID:/ { print $3 }'`
cat << EOF | sudo tee -a /etc/fstab
UUID=$VOLUME_UUID none apfs rw,noauto
EOF

# Disable auto mounting of "macOS" volume
VOLUME_PATH="/Volumes/macOS"
VOLUME_UUID=`diskutil info "$VOLUME_PATH" | awk '/Volume UUID:/ { print $3 }'`
cat << EOF | sudo tee -a /etc/fstab
UUID=$VOLUME_UUID none apfs rw,noauto
EOF
sunknudsen
  • 982
  • 10
  • 21