installer

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LiveMountPoint  = "/run/initramfs/live"
	SquashfsRelPath = liveDir + "/" + squashfsImg
	SquashfsPath    = LiveMountPoint + "/" + SquashfsRelPath
	InstallDesc     = LiveMountPoint + "/" + installDir + "/" + installCfg
	InstallScript   = LiveMountPoint + "/" + installDir + "/" + cfgScript
)

Variables

This section is empty.

Functions

func LoadISOInstallDesc

func LoadISOInstallDesc(s *sys.System, tempDir, iso string) (*deployment.Deployment, error)

LoadISOInstallDesc extracts the install description file form the given ISO and parses it into a new deployment

Types

type Media

type Media struct {
	Name      string
	OutputDir string
	Label     string
	InputFile string
	// contains filtered or unexported fields
}

func NewMedia

func NewMedia(ctx context.Context, s *sys.System, mType MediaType, opts ...Option) *Media

func (Media) Build

func (i Media) Build(d *deployment.Deployment) (err error)

Build creates a new media installer image with the given installation and deployment parameters

func (*Media) Customize

func (i *Media) Customize(d *deployment.Deployment) (err error)

Customize repacks an existing installer with more artifacts.

func (*Media) PrepareInstallerFS

func (i *Media) PrepareInstallerFS(rootDir, workDir string, d *deployment.Deployment) error

PrepareInstallerFS prepares the directory tree of the installer image, rootDir is the path of the directory tree root and workDir is the path to extract source image, typically a temporary directory entirely managed by the caller logic.

type MediaType

type MediaType int
const (
	ISO MediaType = iota + 1
	Disk
)

func StringToMediaType

func StringToMediaType(mType string) (MediaType, error)

func (MediaType) String

func (m MediaType) String() string

type Option

type Option func(*Media)

func WithBootloader

func WithBootloader(bootloader bootloader.Bootloader) Option

WithBootloader allows to create an ISO object with the given bootloader interface instance

func WithOutputFile

func WithOutputFile(outputFile string) Option

func WithRawDiskSize

func WithRawDiskSize(size deployment.MiB) Option

func WithUnpackOpts

func WithUnpackOpts(opts ...unpack.Opt) Option

WithUnpackOpts allows to create an ISO object with the given unpack package options

Jump to

Keyboard shortcuts

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