Contribute
Register

[GUIDE] How to encrypt your home with Filevault2 (the easy way)

Status
Not open for further replies.
Joined
Oct 12, 2014
Messages
2
Mac
  1. 0
Classic Mac
  1. 0
Mobile Phone
  1. 0
When I was planning on my first hackintosh I never realised that I wasn't going to be able to encrypt my disk, I guess it's not as important to people as it is to me, or else I would have found more articles during my research pointing to this HUGE caveat. Anyway, for me it is so important that I considered selling my hardware if I wouldn't be able to encrypt my disk. I read about different solutions to this problem, but I wasn't satisfied with any. In the end I settled with what I will present here, which is very simple and I hope will be useful to others. This encrypts only your home, which in my case was all I needed.

THE GUIDE:
The idea is to create a new partition to use as home directory for a single user computer (it can be easily extended to multiple users), encypt it, and then mount that partition as it's home. To be able to do this, we boot our mac to a secondary user which only purpose is to unlock the home partition of the main user. This has an added advantage, you can have a very complex password for your encrypted home partition, which you'll have to type only once in a while (when you boot), while having a simpler password for your user.

0. Recomended: Try to move as much data out of the disk as possible, since this way we'll be able to make space for our home partition. (you should make a backup anyway)
1. Fire Disk utility, select your OSX disk, go to partition, in the partition layout graph, go to the lower right corner and drag the partition size up to the size you'd like your root partition to have. Hit Apply.
2. Create a new partition using the "+" symbol and use the whole remaining space, name the partition as your username, let's call it "bob".
3. Go to finder, right click on the new partition and select "Encrypt" (you'll have to wait a certain time here, to make sure it's done, you can try logging out and in again, if it prompts for password, it's encrypted)
4. Create a new user "unlock", give admin privileges.
5. logout
6. Login into the "unlock" user
7. Open a terminal: (be sure you have a backup before this step, just in case)
Code:
sudo rsync -av /Users/bob/ /Volumes/bob/

sudo rm -frv /Users/bob

sudo ln -s /Volumes/bob /Users/bob
8. Logout unlock, login to bob
9. Remove admin rights for user unlock

Done!

There are three (possibly more) workflows to use:
1. You can setup automatic login for the unlock user, once you login, you'll be prompted the password for the "bob" partition, once the partition is unlocked, you can logout and login to your user. (I use this one)

2. You can just login to "unlock" as a normal user, enter "unlock" password, be prompted with the partition password, enter second password, logout and login into "bob". I recommend the "unlock" user password and filevault password are different

3. Another option is to have a complex password for the "unlock" user, and then save the filevault2 password in the keychain for "unlock". This way you just enter one password, as in option one.


The nice thing about this setup is that if you try to login to "bob" as soon as you boot (with the locked partition), it will try to login for 10 - 20 seconds, and tell you it failed to do so, you'll just return to normal login where you can login to unlock and unlock your partition.

BTW, I'm pretty sure I won't be upgrading my system or anything like that, just want to have a stable 10.9.5 system and that's it. But I don't see why upgrading would be a problem, I would probably do it from the unlock user if I needed to.

Hope this helps someone else with the same issue I was having! And I welcome any ideas/criticisms to this guide.
 
Thanks for your help. I am also very concerned about data encryption. What also surprises me is the lack of articles about that. During my researches, I didn't see this problem and I discovered it by accident. It's a deal breaker for me, but then I realised that there is probably some alternatives.

Maybe you could help me a little more. Some noob questions here:
- can you confirm that it is possible to encrypt a non-system drive with filevault 2? (I would like to have a small non encrypted SSD for OS X and apps, and an encrypted DD for data).
- can Time Machine be encrypted with FV2?
- do encrypted volumes (like sparsebundle) work?

Thanks a lot.
 
BTW, I'm pretty sure I won't be upgrading my system or anything like that, just want to have a stable 10.9.5 system and that's it. But I don't see why upgrading would be a problem, I would probably do it from the unlock user if I needed to.

Long time later... For users with unsupported keyboards (for FileVault 2 w/ Clover, that is: no PS2 keyboard driver with KeyAggregator support outside AMI UEFI) this is still of interest.

Did you try to install updates via AppStore, or even a full system upgrade? Did it run smoothly? Any caveats?
 
Last edited:
Did you try to install updates via AppStore, or even a full system upgrade? Did it run smoothly? Any caveats?
franciscohs was last seen: Dec 14, 2014 ;)
 
Long time later... For users with unsupported keyboards (for FileVault 2 w/ Clover, that is: no PS2 keyboard driver with KeyAggregator support outside AMI UEFI) this is still of interest.

Did you try to install updates via AppStore, or even a full system upgrade? Did it run smoothly? Any caveats?

So I just set up a 10.13.4 system like so:
  • Single SSD set up as APFS container with:
    • Unencrypted Boot volume with local admin account
    • Encrypted User volume
After setting the User's home folder to a subfolder within the encrypted user volume, I boot into the local admin account, and it asks me for the User volume's password. I enter it in (saving to keychain if desired), the volume mounts, then I log out of the local admin account and into the User account.

This setup is working fine so far. An added bonus of using APFS is you don't have to make pre-defined partition sizes, as the APFS space-saving feature lets both volumes coexist and use as much of the underlying physical storage as they need.
 
Last edited:
So I just set up a 10.13.4 system like so:
  • Single SSD set up as APFS container with:
    • Unencrypted Boot volume with local admin account
    • Encrypted User volume
[ … ] An added bonus of using APFS is you don't have to make pre-defined partition sizes, as the APFS space-saving feature lets both volumes coexist and use as much of the underlying physical storage as they need.

Apart from APFS (I don't trust this youngster yet...) I'm planning the same.
Let us know how a major system update playes out! That is my major concern right now.
 
One thing I learned already... don't set the home folder to the volume itself. There were some odd permission errors that I couldn't fix, but having a subfolder within the volume be my home folder is fine.

Having a non-standard home folder location has been a feature for a long time (I remember doing it back in 2010). As long as you set it up via System Preferences, it should work fine, though since it's a fairly uncommon scenario, I imagine the test coverage for it is not as broad.
 
One thing I learned already... don't set the home folder to the volume itself. There were some odd permission errors that I couldn't fix, but having a subfolder within the volume be my home folder is fine.

Having a non-standard home folder location has been a feature for a long time (I remember doing it back in 2010). As long as you set it up via System Preferences, it should work fine, though since it's a fairly uncommon scenario, I imagine the test coverage for it is not as broad.

Thanks for the subfolder hint! Next time I'll do that. This time I did it via Sys Prefs, but on the volume itself, and it is not encrypted yet. IIRC, the only permission errors were with apps that relied on paths they had stored themselves.
And the latest system update (security update 2018-002 for 10.12.6) didn't cause trouble yet (running ~2hrs now after reboot).

Happy Easter, everyone caring for a holiday! :)
 
Status
Not open for further replies.
Back
Top