-
Notifications
You must be signed in to change notification settings - Fork 116
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
initrdscripts: Make cryptsetup fail hard in unexpected conditions #3486
Conversation
Website deployed to CF Pages, 👀 preview link https://9b90b1a3.balena-os.pages.dev |
return 0 | ||
} | ||
|
||
cryptsetup_run() { |
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.
We'll probably need to change this from always running, to always running when the device is in user mode. Otherwise, systems without secure boot may not boot.
84cd763
to
a25a784
Compare
@mtoman we have seen issues with this change because lsblk sometimes seems to output an extra whitespace. here for example: $ LUKS_PARTITIONS=$(lsblk -nlo "kname,uuid,fstype,partlabel" "/dev/${BOOT_DEVICE}" | grep "crypto_LUKS")
$ echo $LUKS_PARTITIONS
sda
sda1 3845-FC2 vfat balena-efi
sda2 0b587cd9-60bd-47dd-909e-f23e8f7b6e36 crypto_LUKS resin-boot
... there are 2 spaces between Other uses of lblk always cut the first column ( I suggest adding |
@mtoman thanks for the info, i was looking through the latest merges but must have missed this one. It does indeed fix our issue. Sorry for the unnecessary comment. |
This patch adds a set of checks that make sure that the partition layout is as expected on a system with encrypted disks.
Contributor checklist
Change-type
present on at least one commitSigned-off-by
is presentReviewer Guidelines