Skip to content

Commit

Permalink
Refresh partitions after veritysetup so that hash partition's UUID is…
Browse files Browse the repository at this point in the history
… accurate
  • Loading branch information
fintelia committed Nov 27, 2024
1 parent 9c00c57 commit db60d0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions toolkit/tools/pkg/imagecustomizerlib/imagecustomizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,12 @@ func customizeVerityImageHelper(buildDir string, baseConfigPath string, config *
return fmt.Errorf("failed to stat file (%s):\n%w", grubCfgFullPath, err)
}

// Refresh disk partitions so that the hash partition's UUID is correct
diskPartitions, err = diskutils.GetDiskPartitions(loopback.DevicePath())
if err != nil {
return err
}

err = updateGrubConfigForVerity(rootfsVerity, rootHash, grubCfgFullPath, partIdToPartUuid, diskPartitions)
if err != nil {
return err
Expand Down

0 comments on commit db60d0e

Please sign in to comment.