Last Updated: February 25, 2016
·
1.108K
· destructuring

Encrypted OS X disk images

I have a encrypted Secrets.dmg disk image on every computer with my ssh, gpg keys, and 1Password database. Makes it easy to synchronize between encrypted volumes on different computers using rsync or a USB thumb drive.

Create a "Secrets.dmg" disk image:

hdiutil create -attach -volname "Secrets" -size 1gb -fs "Journaled HFS+" "Secrets"

Encrypt it using FileVault:

diskutil coreStorage convert "Secrets" -passphrase "Secrets"

Monitor the encryption progress until it is 100% before unmounting it:

diskutil coreStorage list