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
nixos/luksroot: Check whether the device already exists #50281
Conversation
@GrahamcOfBorg test installer.luksroot |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.boot.luksroot Partial log (click to expand)
|
@GrahamcOfBorg test installer.luksroot |
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: tests.installer.luksroot Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.installer.luksroot Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.installer.luksroot Partial log (click to expand)
|
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: tests.installer.luksroot Partial log (click to expand)
|
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: tests.boot.luksroot Partial log (click to expand)
|
Bump |
# Return if already unlocked | ||
if [ -b "/dev/mapper/${name}" ]; then | ||
return | ||
fi |
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.
Use cryptsetup status ${name}
instead, it will exit with 0 if it exists (with 4 if it doesn't)
The new reuse behaviour is cool and really useful but it breaks one of my use cases. When using kexec, I have a script which will unlock the disks in my initrd. However, do_open_passphrase will fail if the disk is already unlocked.
@infinisil Fixed and rebased |
Broke my boot sequence, stuck on |
@eadwu Strange, to me it looks like it's waiting before the changed code is executed |
Yes, the order from my initrd:
|
This reverts commit 14b0a4f. Apparently this can break peoples setup: #50281 (comment)
It would help to add |
reverted also on master: 50071c4 |
This reverts commit 9cd4ce9. This might be broken for some people: #50281 (comment)
The new reuse behaviour is cool and really useful but it breaks one of
my use cases. When using kexec, I have a script which will unlock the
disks in my initrd. However, do_open_passphrase will fail if the disk is
already unlocked.
Btw, can this be backported?
Motivation for this change
It braks my old (18.03) kexec-and-autounlock behaviour.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)