Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Prevent Encrypted Partition From Mounting at Boot

I have an external USB HDD partitioned into two. Both partitons are encrypted. I use partition A for a time machine backup for my mac, and the other (when pluged in to a different macbook) is used similarly for that machine. Every time I boot up, or plug the drive in, I get 2 dialogue boxes asking me to enter passwords - one for each partiton.


I'd like is to set my OS to not mount the second partition on boot at all (no password dialogue / no disk in finder). If I need to mount it, I'd like to be able to do so via Disk Utility.


I've tried using the method described here: https://discussions.apple.com/thread/4271735?start=0&tstart=0, but it does not work - perhaps because my partiton is encrypted? Is there perhaps a different fs type for encrypted disks? (not "hfs").


I've also followed this thread: https://discussions.apple.com/thread/4870225 , but I'm reticent to switch off automounting totally because I use other encrypted disks for work and need them to mount at boot.


Any thoughts?

iMac, OS X Mountain Lion (10.8), 27" Mid 2011 i5

Posted on Aug 13, 2013 5:11 AM

Reply
9 replies

Aug 15, 2013 8:08 AM in response to Questulent

It seems that the fstab method doesn't work with CoreStorage volumes.


There is no way I know of to prevent automounting of CoreStorage volumes selectively. You may be able to prevent all CS volumes from automounting by deleting or commenting out the "LaunchEvents" key in this file:


/System/Library/LaunchDaemons/com.apple.corestorage.corestoraged.plist


I haven't tested this hack, I don't endorse it, and I have nothing else to say about it. Please don't ask me for help if it doesn't work or has unexpected effects.

Mar 4, 2014 1:08 PM in response to Questulent

I've been struggling with this exact problem after encrypting two external volumes on a USB drive last week. I've been using the /etc/fstab method to prevent them from automounting every time I plug in the USB and this was working perfectly until I encrypted the volumes.


I thought it might be to do with the volume UUID used in the fstab file for the encrypted volume. If you use:


$ diskutil coreStorage list


you'll see different UUIDs listed for your volumes than what you get when you use:


$ diskutil info /dev/DISKID


I get something like (abbreviated and edited) when listing the coreStorage disks:


+-- Logical Volume Group UUID_A

| +-< Physical Volume UUID_B

| +-> Logical Volume Family UUID_C

| +-> Logical Volume UUID_D


However, I used UUID_A thru D in the /etc/fstab file and didn't have any success at all.


Haven't been able to find a solution yet, but still looking.

Mar 16, 2014 7:01 PM in response to Questulent

Linc Davis wrote:


It seems that the fstab method doesn't work with CoreStorage volumes.


Yes, that's correct. Core Storage doesn't look at fstab at all.


If the only Core Storage volumes you have are encrypted containers, you can achieve the desired outcome by disabling boot time invocation of the Core Storage daemon. Please note that Apple's Fusion Drive technology relies on Core Storage, so if you have a system with Fusion Drive, this workaround may break your computer.


Linc Davis wrote:


There is no way I know of to prevent automounting of CoreStorage volumes selectively. You may be able to prevent all CS volumes from automounting by deleting or commenting out the "LaunchEvents" key in this file:


That's the idea, but good heavens, don't comment things out in launch plists! Do it right, use launchctl.


The Core Storage daemon normally runs at boot, and manages logical volumes assigned to Core Storage—specifically, in the OP's case, encrypted containers. If you have no other mission-critical Core Storage volumes, you may use the launchctl command to disable the Core Storage daemon, using the unload -w argument, as per the launchctl man page:


unload [-w] [-S sessiontype] [-D domain] paths ...

Unload the specified configuration files or directories of con-

figuration files. This will also stop the job if it is running.


-w Overrides the Disabled key and sets it to true. In pre-

vious versions, this option would modify the configura-

tion file. Now the state of the Disabled key is stored

elsewhere on-disk.


So, in Terminal, the command to prevent Core Storage from running at boot time would be as follows:



$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.corestorage.corestoraged.plist



Please note again that Apple's Fusion Drive technology relies on Core Storage, so if you have a system with Fusion Drive, this workaround may break your computer.


After disabling the Core Storage daemon, you may still mount encrypted volumes using Disk Utility, or the command line (hdiutil attach /dev/diskX where /dev/diskX is the encrypted container).


Hope this helps.

Mar 17, 2014 12:35 AM in response to Nathan Phoenix

Thanks for such a comprehensive comment. This greatly explain how CoreStorage work.


In my case, I have my boot partition encrypted. This prevents me to turn the CoreStorage off as I would not be able to boot.


I.e. if one has a boot partition encrypted, there is no way to prevent another encrypted drive to get mounted on boot automactically. Or at least no one knows if this is possible.

Prevent Encrypted Partition From Mounting at Boot

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.