Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Unlock multiple Core Storage encrypted volumes at boot.
Objective-C Shell
Branch: objc
Pull request Compare This branch is 25 commits behind master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.



Unlock allows the system to unlock and mount Core Storage encrypted volumes during boot. In other words, this allows you to log in as a user whose home directory is on an encrypted secondary disk without any problems.


Like a many power users, I have two disks in my Macbook Pro. My startup volume is on a SSD and all of my home folder is on a second disk drive. Mac OS X Lion's FileVault 2 supports unlocking and mounting the startup volume, but doesn't support unlocking any other volume until a user has logged in. After encrypting my home drive and restarting, I was locked out of my user account and had to log in to and out of another user just to log in in as myself. This script solves that problem by unlocking Core Storage volumes (e.g., my home disk) without the need for another user account. Simply put, it allows me to log in like normal.


Run this in the terminal.

bash <(curl -s
  • You will be asked for your login password.
  • Follow the prompts
    • The script will find all Core Storage encrypted volumes connected to your computer (it will ignore the startup volume).
    • It will then loop through the volumes it finds and ask you if you want to unlock the volume during boot.
      • If you do, it will then ask for the passphrase used to unlock that volume.
  • Everything should be set up! Restart your computer and log in to test.


Run this in the terminal (you'll be asked for your login password) to remove all traces from the system.

bash <(curl -s


Does this encrypt my drive?

No, this script only unlocks volumes during boot. You must encrypt the volumes yourself before using this script.

Will this work after updates?

Yes, this script will continue to work even after updates. Because Apple doesn't delete LaunchDaemons during updates, the script will always be there to run on startup. And because the script uses Apple's own programs and supported commands, the script will continue to work.

What if Apple fixes the bug?

If Apple does fix the bug, the script will not harm nor interfere in anyway. Because of the way the script works, the worst case scenario is a warning appearing in the console logs. Run the uninstall script and everything will go back to normal.

I'm user A. What if user B logs in? Will my home drive be mounted?

Yes it will. The script is not aware of who is logging in and I don't know of a way to make it aware other than making it a User LaunchDaemon, which won't work. A pull request implementing this would be greatly appreciated.


If you have a problem, file a bug report or fix it and submit a pull request.

Something went wrong with that request. Please try again.