Add label to luks partition and dont gate on label

Instead of gating on labels, lets just add the label to the luks
partition, the same way we do to the underlying unlocked partition, so
they share the fs label. That way, the locking and unlocking refer to
the same label always

Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
Itxaka
2025-03-12 20:23:15 +01:00
parent 654d4de653
commit 531e4ff400
3 changed files with 6 additions and 49 deletions

View File

@@ -76,6 +76,7 @@ func Luksify(label string, logger types.KairosLogger, argsCreate ...string) (str
device := fmt.Sprintf("/dev/%s", part)
extraArgs := []string{"--uuid", uuid.NewV5(uuid.NamespaceURL, label).String()}
extraArgs = append(extraArgs, "--label", label)
extraArgs = append(extraArgs, argsCreate...)
if err := CreateLuks(device, pass, extraArgs...); err != nil {