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!

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.