iso

package
v1.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2025 License: MPL-2.0 Imports: 15 Imported by: 1

Documentation

Overview

Package iso contains functions for creating ISO images.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Label added in v1.8.0

func Label(version string, secureboot bool) string

Label returns an ISO full label for a given version.

func VolumeID added in v1.8.0

func VolumeID(label string) string

VolumeID returns a valid volume ID for the given label.

Types

type ExecutorOptions added in v1.10.0

type ExecutorOptions struct {
	Command   string
	Version   string
	Arguments []string
}

ExecutorOptions defines the iso generation options.

func (*ExecutorOptions) Generate added in v1.10.0

func (e *ExecutorOptions) Generate() error

Generate creates an ISO image.

type Generator added in v1.10.0

type Generator interface {
	Generate() error
}

Generator is an interface for executing the iso generation.

type Options added in v1.10.0

type Options struct {
	KernelPath    string
	InitramfsPath string
	Cmdline       string

	UKIPath    string
	SDBootPath string

	Arch    string
	Version string

	// A value in loader.conf secure-boot-enroll: off, manual, if-safe, force.
	SDBootSecureBootEnrollKeys string

	// UKISigningCertDer is the DER encoded UKI signing certificate.
	UKISigningCertDerPath string

	// optional, for auto-enrolling secureboot keys
	PlatformKeyPath    string
	KeyExchangeKeyPath string
	SignatureKeyPath   string

	ScratchDir string
	OutPath    string
}

Options describe the input generating different types of ISOs.

func (Options) CreateGRUB added in v1.10.0

func (options Options) CreateGRUB(printf func(string, ...any)) (Generator, error)

CreateGRUB creates a GRUB-based ISO image.

This iso supports both BIOS and UEFI booting.

func (Options) CreateHybrid added in v1.10.0

func (options Options) CreateHybrid(printf func(string, ...any)) (Generator, error)

CreateHybrid creates an ISO image that supports both BIOS and UEFI booting.

func (Options) CreateUEFI added in v1.10.0

func (options Options) CreateUEFI(printf func(string, ...any)) (Generator, error)

CreateUEFI creates an iso using a UKI, systemd-boot.

The ISO created supports only booting in UEFI mode, and supports SecureBoot.

type UEFIOptions

type UEFIOptions struct {
	UKIPath    string
	SDBootPath string

	// A value in loader.conf secure-boot-enroll: off, manual, if-safe, force.
	SDBootSecureBootEnrollKeys string

	// UKISigningCertDer is the DER encoded UKI signing certificate.
	UKISigningCertDerPath string

	// optional, for auto-enrolling secureboot keys
	PlatformKeyPath    string
	KeyExchangeKeyPath string
	SignatureKeyPath   string

	Arch    string
	Version string

	ScratchDir string
	OutPath    string
}

UEFIOptions describe the input for the CreateUEFI function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL