Skip to content

Commit

Permalink
Update Verity hash for both UKI and GRUB.
Browse files Browse the repository at this point in the history
  • Loading branch information
liulanze committed Jan 8, 2025
1 parent f33af7e commit 29bf6a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions toolkit/tools/pkg/imagecustomizerlib/imagecustomizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,13 @@ func customizeVerityImageHelper(buildDir string, baseConfigPath string, config *
if err != nil {
return fmt.Errorf("failed to update kernel cmdline arguments for verity:\n%w", err)
}

// Temporary make UKI also update GRUB for Verity hash.
err = updateGrubConfigForVerity(rootfsVerity, rootHash, grubCfgFullPath, partIdToPartUuid, diskPartitions,
rootHashSignatureArgument, requireRootHashSignatureArgument, bootPartition.Uuid)
if err != nil {
return fmt.Errorf("failed to update grub config for verity:\n%w", err)
}
} else {
// UKI is not enabled, update grub.cfg as usual.
err = updateGrubConfigForVerity(rootfsVerity, rootHash, grubCfgFullPath, partIdToPartUuid, diskPartitions,
Expand Down

0 comments on commit 29bf6a0

Please sign in to comment.