jridgewell / Unlock

Unlock multiple Core Storage encrypted volumes at boot.
MIT License
197 stars 34 forks source link

Specifying Mount Point #22

Open A-Coward opened 8 years ago

A-Coward commented 8 years ago

Is there a way to specify a mount point when using "Unlock"? I looked at the code and all it does it unlocks an encrypted partition: I don't see anything which actually mounts it. So, I'm assuming after it is unlocked, the OS mounts it to "/Volumes". However, I'd like to mount the partition to a different location (in my case I want to mount an encrypted partition to "/Users").

I can probably modify the code myself, but am not familiar if it's possible to specify a mount point when unlocking a CoreStorage volume using "diskutil", or if there is a way to tell OS X to use mount to a specific directory (like through "fstab").

Thanks!

mattpr commented 6 years ago

My understanding is the following. FileVault only encypts/decrypts the boot partition on boot...so if you keep necessary things (e.g. /Users) in a separate disk/partition... you won't be able to login because that second partition won't be automatically decrypted. So you either leave it un-encrypted or use a script (like Unlock) to trigger the decryption of these "secondary" encrypted partitions from within the boot partition after the boot partition is decrypted and the system is starting up.

Things like mount points are a separate issue and should already be configured in your fstab. The issue is that when the fstab file is processed to mount your mounts it will fail if the partition that is supposed to be mounted to /Users is encrypted. This configuration shouldn't change from before you encrypted your disk.

$ cat /etc/fstab
UUID=[VOLUME_UUID] /Users hfs auto

tldr: This Unlock script makes sure that your secondary partitions (e.g. where you keep contents of /Users) is decrypted before those partitions are mounted in the bootup process. The mountpoints are still configured in fstab like before.