mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-03 11:41:10 +02:00
This reverts commit 3515f4e0f8c11352539ed0d430e1f44f73c8229f. Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
28 lines
568 B
Go
28 lines
568 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package pkg
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/talos-systems/talos/pkg/cmd"
|
|
)
|
|
|
|
// CreateISO creates an iso by invoking the `grub-mkrescue` command.
|
|
func CreateISO(iso, dir string) (err error) {
|
|
_, err = cmd.Run(
|
|
"grub-mkrescue",
|
|
"--compress=xz",
|
|
"--output="+iso,
|
|
dir,
|
|
)
|
|
|
|
if err != nil {
|
|
return fmt.Errorf("failed to create ISO: %w", err)
|
|
}
|
|
|
|
return nil
|
|
}
|