Skip to content

Commit

Permalink
feat: ISO VolumeID with ReleaseID siderolabs#8769
Browse files Browse the repository at this point in the history
  • Loading branch information
xerc committed Jul 30, 2024
1 parent 96492c0 commit a6a5c47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
9 changes: 5 additions & 4 deletions pkg/imager/iso/grub.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ func CreateGRUB(printf func(string, ...any), options GRUBOptions) error {

printf("creating ISO image")

return grubMkrescue(options.OutPath, options.ScratchDir)
return grubMkrescue(options)
}

func grubMkrescue(isoPath, scratchPath string) error {
func grubMkrescue(options GRUBOptions) error {
args := []string{
"--compress=xz",
"--output=" + isoPath,
scratchPath,
"--output=" + options.OutPath,
options.ScratchDir,
}

if epoch, ok, err := utils.SourceDateEpoch(); err != nil {
Expand All @@ -106,6 +106,7 @@ func grubMkrescue(isoPath, scratchPath string) error {

args = append(args,
"--",
"-V", fmt.Sprintf("TalosBoot-%s", options.Version),
"-volume_date", "all_file_dates", fmt.Sprintf("=%d", epoch),
"-volume_date", "uuid", time.Unix(epoch, 0).Format("2006010215040500"),
)
Expand Down
12 changes: 4 additions & 8 deletions pkg/imager/iso/uefi.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,11 @@ func CreateUEFI(printf func(string, ...any), options UEFIOptions) error {

if _, err := cmd.Run(
"xorriso",
"-as",
"mkisofs",
"-V",
"Talos Secure Boot ISO",
"-e",
"efiboot.img",
"-as", "mkisofs",
"-V", fmt.Sprintf("TalosBoot-%s", options.Version)
"-e", "efiboot.img",
"-no-emul-boot",
"-o",
options.OutPath,
"-o", options.OutPath,
options.ScratchDir,
); err != nil {
return err
Expand Down

0 comments on commit a6a5c47

Please sign in to comment.