Skip to content

Commit

Permalink
Trigger udev to populate disk info
Browse files Browse the repository at this point in the history
because otherwise, sometimes the encrypted partition doesn't show up as
type: crypto_LUKS but as type: unknown making kcrypt skip it completely

Part of kairos-io/kairos#2511

(an additional seems to be needed in kairos-agent when locking the
partitions to fully fix the issue)

Signed-off-by: Dimitris Karakasilis <[email protected]>
  • Loading branch information
jimmykarily committed May 23, 2024
1 parent 74a54e6 commit dc0a97c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/lib/unlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ func UnlockAllWithLogger(tpm bool, logger zerolog.Logger) error {
return nil
}

logger.Info().Msgf("triggering udev to populate disk info")
_, err = utils.SH("udevadm trigger -v --type=all")
if err != nil {
return err
}

for _, disk := range blk.Disks {
for _, p := range disk.Partitions {
if p.Type == "crypto_LUKS" {
Expand Down

0 comments on commit dc0a97c

Please sign in to comment.