Commit Graph

16 Commits

Author SHA1 Message Date
Itxaka
b5869b4017
Fix hooks under encrypted partitions (#702)
* Fix hooks under encrypted partitions

We had a mess of mounting and unmounting things around when we try to
copy things to persistent.

Part of the changes (using the by-label to mount the persistent) are due
to the change in kcrypt. As we set the same label to the encrypted fs
and unencrypted fs, our utils.Mount could get mistaken and return the
first hit, which usually its the encrypted one, and we cannot mount that
one.

This patch brings it up to date.

 - Makes bundles and logs hooks work when we have encrypted persistent.
   It didnt work before.
 - Makes both workflows the same.
 - Locks everything once its over, to not leave encrypted parts around
 - Mounts OEM so kcrypt can read the config if we are using a remote
   server for encryption
 - Mounts by label so there is not a change of getting the wrong device
 - Uses the mount syscall directly. The util can mistake and return the
   actual encrypted part if they both have the same label and finds it
   first

---------

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-03-13 11:22:26 +01:00
Itxaka
895e571bb3
Expose pcrs for uki encryption (#603) 2024-11-20 10:41:52 +01:00
Itxaka
02eb9d32a0
Let kcrypt add the allow discards option (#434) 2024-07-31 18:00:29 +02:00
Itxaka
0d8d534d5d
Encrypt luks partition with allow-discards (#423) 2024-07-29 09:47:03 +02:00
Itxaka
aebc8f6083
Bump kcrypt and adapt hooks (#385) 2024-06-20 11:19:29 +02:00
Björn Brauer
54a528a44a
Ensure only numeric part of systemd version is converted to int (#362) 2024-06-12 10:08:19 +02:00
Dimitris Karakasilis
382b1944b3
Move udevadm triggering in kcrypt
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-05-23 16:05:31 +03:00
Itxaka
d1f65cd334
Centralize uki hooks for encryption reasons (#309) 2024-04-24 16:42:51 +02:00
Itxaka
8583d38b68
Retry unlock if we cant find the unlocked partitions (#241) 2024-03-19 09:27:13 +01:00
Itxaka
0ae9c04eb4
Make sure kcrypt hook umounts persistent (#244) 2024-03-07 15:11:51 +01:00
Itxaka
2e0af77fbc
Use new logger facilities (#236) 2024-03-01 12:27:26 +01:00
Itxaka
1a46f0910f
[uki] Wait for oem to appear after encryption (#216) 2024-01-30 14:28:54 +01:00
Ettore Di Giacinto
79a577d0f3
feat(uki-partitioning): respect additional encrypted partition list (#206) 2024-01-24 10:48:33 +01:00
Itxaka
53f49169b1
Fix uki mode detection (#198) 2024-01-10 10:38:31 +01:00
Itxaka
3254b8a36e
Uki upgrade (#182) 2023-12-18 11:38:26 +01:00
Itxaka
7ca39f2729
Encrypt uki partitions after install (#176) 2023-12-12 20:51:55 +00:00