mirror of
https://github.com/kairos-io/kcrypt.git
synced 2025-09-01 06:59:30 +00:00
Trigger udev to populate disk info
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 https://github.com/kairos-io/kairos/issues/2511 (an additional seems to be needed in kairos-agent when locking the partitions to fully fix the issue) Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
committed by
Itxaka
parent
5274499e1a
commit
7de640988f
@@ -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" {
|
||||
|
Reference in New Issue
Block a user