-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arch Linux: Nest system datasets; LUKS bpool; secure boot #127
Conversation
|
Actually I think enabling encryption on the pool dataset If we store everything under a child dataset, say This also allows multi-distro, each with their own encryption password at boot: Maybe this is the way forward? |
|
Worked out the changes. Datasets are nested under Can be renamed online with As stated above. If one want to enable/disable encryption, just follow the guide to recreate datasets, and copy things over. No |
This comment has been minimized.
This comment has been minimized.
Right, those are the downsides. Some advantages of making the top-level dataset the encryption root are:
Disabling encryption is perfectly fine. But if you want to enable encryption or change the key, there's no great way to guarantee that the old data is off the disk. Granted, with SSDs and TRIM, it's pretty close. And there is a trade-off: if we want to make an absolute guarantee, then the answer is "wipe the disk and rebuild your pool", but that's not great for e.g. individual desktop users, and getting them something good might be better than nothing. Personally, I don't think that encrypted -> unencrypted is a transition that people generally are about these days. The other direction (enabling encryption) is probably more common. But that said, I personally don't see a lot of value in being able to transition. One should just do it right on the install the first time. ;)
It allows for that yes. It also more-or-less requires it. While the passphrases can be manually set to be the same, they're not the same encryption root. If that is what someone wants, it's a feature. If that is not what someone wants, it's a "bug" (not really, but the user won't love it). So this cuts both ways. |
|
Regarding multi-distro:
If one wants to enable encryption for all distros, with the same passphrase, then yes, she has to manually set the same passphrase, this is supported. Disabling encryption or setting different passphrases is also supported, thus more flexible than shared encroot. Of course, not sharing the same encroot also means that the master key is not shared, so more secure than shared encroot. |
|
Scrolling LUKS faq:
So unencrypted boot pool is a security risk, especially on a system with encrypted root pool. For real security, it's either encrypt everything or nothing. initrd can be trivially modified to intercept and transfer root pool passphrase. initrd, in unencrypted boot pool, is world-writable by everyone who has physical access to the computer. The only way to mitigate this issue is to use GRUB and encrypt boot pool with LUKS. |
This comment has been minimized.
This comment has been minimized.
Two things to remember about security are: 1) What is your threat model? 2) There are always trade-offs. I'm personally less worried about a motivated attacker trojaning my initrd to capture my passphrase. I'm primarily trying to protect the data at rest. That is, if someone steals my laptop, the data is protected. The thief is far more likely to be stealing my laptop out of a desire for the laptop, not the data. But keeping the data encrypted at rest means I don't need to worry so much about the data being compromised. There are other environments with other threat models. If I've got Top Secret national security data on my laptop, the threat model is likely very different. But I'm not trying to target that high of a threat model / security environment (nor am I likely competent to do so by myself). It is certainly possible to do the unlocking with GRUB, using a LUKS-encrypted boot partition of some kind. Then, inside that LUKS-encrypted boot partition, you can store a keyfile which is used to unlock the root filesystem/pool. I even implemented that once in the Ubuntu HOWTO. But I eventually dropped that because a key design goal of mine is to follow the distro (Ubuntu in that case) as closely as possible. I'm trying to make ZFS an option, not second-guess all the distro design decisions. Ubuntu uses an unencrypted initrd and has the initrd (not GRUB) prompt for the passphrase, so that's what I did. Following the distro is less jarring for users; they are presumably happy with their distro choice and just want ZFS. It also makes it far easier and thus far more likely that ZFS support can be integrated into the distro and/or its installer. I encourage you to follow whatever Arch is doing for non-ZFS full-disk encryption setups. If Arch is doing GRUB unlocking, do that. If Arch is doing initrd unlocking, do that. If you dislike their design decisions, then try to address those in the distro rather than carrying large deltas in the ZFS HOWTO. |
This comment has been minimized.
This comment has been minimized.
|
Well I bricked by EliteBook 820 G3 laptop motherboard by using generic tool EDIT: not so completely bricked: screen blank before initramfs, UEFI setup menu broken thus enforcing the enrolled key. Might be fixed with replacing BIOS chip. |
Arch Linux is a DIY distro, there's no installer, only a minimal installation guide exists as framework. Users are also encouraged to choose their own encryption, as evidenced by docs. In the same spirit of ArchWiki, optional LUKS bpool is documented in guide. |
…ning messages Arch Linux Root on ZFS: Encrypt boot pool with LUKS Typo fixes; tweaks Add Secure Boot Secure Boot key enrollment differs Secure Boot: rm HP laptop ref Strictly follow manu. instructions. I bricked my EliteBook 820 G2 with KeyTool.efi Example Secure Boot customization links Back up Secure Boot signing keys Secure Boot: Add link to bricked motherboard Replace Secure Boot with a link; out of scope Signed-off-by: Maurice Zhou <ja@apvc.uk>
|
@rlaager: I'm done with the changes. Please review. |
@rlaager
Signed-off-by: Maurice Zhou ja@apvc.uk