-
Notifications
You must be signed in to change notification settings - Fork 76
(feat): Enable full disk encryption #1634
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
base: main
Are you sure you want to change the base?
Conversation
kajusnau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Not my area of expertise so I'll leave proper review to others, just leaving a small suggestion. 🍻
This change modifies the disk partitioning scheme to use `LVM on LUKS`, compared to the previous scheme which used `LUKS on LVM`. The advantages of the new scheme include reduced layout complexity and the ability to enable full disk encryption. With this approach, there is no need to encrypt different partitions separately. Signed-off-by: Vunny Sodhi <vunny.sodhi@unikie.com>
Signed-off-by: Vunny Sodhi <vunny.sodhi@unikie.com>
brianmcgillion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one!
|
2 things though. you say in the PR description it is only for release but it is enabled in mvp-user-trial. so on all images. which is great actually. it should be on by default for all to get it tested. Also you mention that it is a pin. is is a pin or a password? |
|
Are the laptop image sizes supposed to be 17–18 GiB? |
Apologies for the confusion, disk encryption will be enabled for both debug and release images. To avoid entering PIN every reboot. The PIN requirement applies exclusively to release images. I have tried it with release image. It accepts both PIN and password. (updated description) |
|
(Vunny will check the image size, not ready for testing yet) |
|
This needs to be refactored to be harmonized with A/B updates scheme. It need to use systemd-repart for partitioning!!! |
this is the debug image. not the repart image though. that is a different baseline in partitioning |
Description of Changes
This change modifies the disk partitioning scheme to use
LVM on LUKS, compared to the previous scheme which usedLUKS on LVM. The advantages of the new scheme include reduced layout complexity and the ability to enable full disk encryption. With this approach, there is no need to encrypt different partitions separately.Encryption
Disk encryption will be enabled for both debug and release images. To avoid entering PIN or password on every reboot. The PIN or password requirement applies exclusively to release images.
Authentication:
In debug builds, the boot process remains unchanged. However in release builds, users will be prompted to set a PIN or password during the first boot. For subsequent boots, they will need to enter the same PIN or password to unlock the system.
Partitioning layout details:
Encrypted area highlighted.
With this PR:

With this PR (if

storage.encryption.enable = false):With mainline:

Type of Change
Related Issues / Tickets
Checklist
make-checksand it passesTesting Instructions
Applicable Targets
aarch64aarch64x86_64x86_64x86_64Installation Method
nixos-rebuild ... switchTest Steps To Verify:
Partitioning layoutmatches as mentioned inDescription of Changes