install

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MPL-2.0 Imports: 44 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package install provides the installation routine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(ctx context.Context, p runtime.Platform, mode Mode, opts *Options) error

Install installs Talos.

Types

type DependencyTag added in v1.14.0

type DependencyTag struct{}

Exit-code tags for installer runtime failures.

type EnvironmentTag added in v1.14.0

type EnvironmentTag struct{}

Exit-code tags for installer runtime failures.

type InstallTag added in v1.14.0

type InstallTag struct{}

Exit-code tags for installer runtime failures.

type Installer

type Installer struct {
	// contains filtered or unexported fields
}

Installer represents the installer logic. It serves as the entrypoint to all installation methods.

func NewInstaller

func NewInstaller(ctx context.Context, cmdline *procfs.Cmdline, mode Mode, opts *Options) (i *Installer, err error)

NewInstaller initializes and returns an Installer.

func (*Installer) Install

func (i *Installer) Install(ctx context.Context, mode Mode) (err error)

Install fetches the necessary data locations and copies or extracts to the target locations.

type InvalidInputTag added in v1.14.0

type InvalidInputTag struct{}

Exit-code tags for installer runtime failures.

type MetaValues added in v1.4.0

type MetaValues struct {
	// contains filtered or unexported fields
}

MetaValues is a list of MetaValue.

func FromMeta added in v1.5.0

func FromMeta(values meta.Values) MetaValues

FromMeta returns a new MetaValues from a meta.Values.

func (*MetaValues) Append added in v1.4.0

func (s *MetaValues) Append(val string) error

Append implements pflag.SliceValue.

func (*MetaValues) Decode added in v1.4.6

func (s *MetaValues) Decode(val string) error

Decode the values from the given string.

func (*MetaValues) Encode added in v1.4.6

func (s *MetaValues) Encode() string

Encode returns the encoded values.

func (*MetaValues) GetMetaValues added in v1.5.0

func (s *MetaValues) GetMetaValues() meta.Values

GetMetaValues returns the wrapped meta.Values.

func (*MetaValues) GetSlice added in v1.4.0

func (s *MetaValues) GetSlice() []string

GetSlice implements pflag.SliceValue.

func (*MetaValues) Replace added in v1.4.0

func (s *MetaValues) Replace(val []string) error

Replace implements pflag.SliceValue.

func (*MetaValues) Set added in v1.4.0

func (s *MetaValues) Set(val string) error

Set implements pflag.Value.

func (*MetaValues) String added in v1.4.0

func (s *MetaValues) String() string

String implements pflag.Value.

func (*MetaValues) Type added in v1.4.0

func (s *MetaValues) Type() string

Type implements pflag.Value.

type Mode added in v1.5.0

type Mode int

Mode is the install mode.

const (
	// ModeInstall is the install mode.
	ModeInstall Mode = iota
	// ModeUpgrade is the upgrade mode.
	ModeUpgrade
	// ModeImage is the image creation mode.
	ModeImage
)

func (Mode) IsImage added in v1.5.0

func (m Mode) IsImage() bool

IsImage returns true if the mode is image creation.

type Options

type Options struct {
	ConfigSource string
	// Can be an actual disk path or a file representing a disk image.
	DiskPath            string
	Platform            string
	Arch                string
	ExtraKernelArgs     []string
	Upgrade             bool
	Force               bool
	Zero                bool
	LegacyBIOSSupport   bool
	GrubUseUKICmdline   bool
	MetaValues          MetaValues
	OverlayInstaller    overlay.Installer[overlay.ExtraOptions]
	OverlayName         string
	OverlayExtractedDir string
	ExtraOptions        overlay.ExtraOptions

	ImageCachePath string
	ImageCacheSize int64

	// Options specific for the image creation mode.
	ImageSecureboot     bool
	DiskImageBootloader string
	ImageSectorSize     uint

	Version     string
	BootAssets  bootloaderoptions.BootAssets
	Printf      func(string, ...any)
	MountPrefix string

	// SecureBoot key auto-enrollment (image creation mode only).
	//
	// When SecureBootEnrollKeys is non-empty, the bootloader installer writes
	// loader/keys/auto/{PK,KEK,db}.auth on the ESP and renders loader.conf with
	// secure-boot-enroll set to this value.
	SecureBootEnrollKeys string
	PlatformKeyPath      string
	KeyExchangeKeyPath   string
	SignatureKeyPath     string
}

Options represents the set of options available for an install.

type PreflightChecks

type PreflightChecks struct {
	// contains filtered or unexported fields
}

PreflightChecks runs the preflight checks.

func NewPreflightChecks

func NewPreflightChecks(ctx context.Context) (*PreflightChecks, error)

NewPreflightChecks initializes and returns the installation PreflightChecks.

func (*PreflightChecks) Close

func (checks *PreflightChecks) Close() error

Close closes the client.

func (*PreflightChecks) Run

func (checks *PreflightChecks) Run(ctx context.Context) error

Run the checks, return the error if the check fails.

Jump to

Keyboard shortcuts

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