Preventing USB Drives from Mounting at Boot

The two USB backup drives that are permanently connected to my iMac have been in service for six years, so I recently ordered replacements.

I wanted the new drives to be unmounted from the computer when they weren’t being updated; I’m not sure why I had never configured this before with the previous drives.

Carbon Copy Cloner will try to mount the target destination if it isn’t mounted when a backup task starts. You can optionally configure the drive to be unmounted when the backup task completes. The only remaining piece of the puzzle is to make sure the drives don’t mount when the machine boots up.

The first step is to find the UUID of your drive. This command will return a UUID with the form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:

diskutil info /Volumes/"Volume Name" | grep 'Volume UUID'

Then, you can a line to the /etc/fstab file with your UUID and the noauto option:

#
# Warning - this file should only be modified with vifs(8)
#
# Failure to do so is unsupported and may be destructive.
#
UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX none hfs rw,noauto

Save the file, reboot, and the drive should be in an unmounted state!