Documentation
¶
Overview ¶
Package install provides the installation routine.
Index ¶
- Variables
- func Install(p runtime.Platform, seq runtime.Sequence, opts *Options) (err error)
- func VerifyBootPartition(opts *Options) (err error)
- func VerifyDiskAvailability(devpath, label string) (err error)
- func VerifyEphemeralPartition(opts *Options) (err error)
- type Asset
- type Device
- type Installer
- type Manifest
- type Options
- type PreflightChecks
- type PreserveSource
- type Target
- func BIOSTarget(device string, extra *Target) *Target
- func BootTarget(device string, extra *Target) *Target
- func EFITarget(device string, extra *Target) *Target
- func EphemeralTarget(device string, extra *Target) *Target
- func MetaTarget(device string, extra *Target) *Target
- func ParseTarget(label, deviceName string) (*Target, error)
- func StateTarget(device string, extra *Target) *Target
- func (t *Target) Format() error
- func (t *Target) GetLabel() string
- func (t *Target) Locate(pt *gpt.GPT) (*gpt.Partition, error)
- func (t *Target) Partition(pt *gpt.GPT, pos int, bd *blockdevice.BlockDevice) (err error)
- func (t *Target) RestoreContents() error
- func (t *Target) Save() (err error)
- func (t *Target) SaveContents(device Device, source *gpt.Partition, fileSystemType partition.FileSystemType, ...) error
- func (t *Target) String() string
Constants ¶
This section is empty.
Variables ¶
var NoFilesystem = &Target{ FormatOptions: &partition.FormatOptions{ FileSystemType: partition.FilesystemTypeNone, }, }
NoFilesystem preset to override default filesystem type to none.
Functions ¶
func VerifyBootPartition ¶
VerifyBootPartition verifies the supplied boot device options.
func VerifyDiskAvailability ¶
VerifyDiskAvailability verifies that no filesystems currently exist with the labels used by the OS.
func VerifyEphemeralPartition ¶
VerifyEphemeralPartition verifies the supplied data device options.
Types ¶
type Installer ¶
type Installer struct {
Current grub.BootLabel
Next grub.BootLabel
// contains filtered or unexported fields
}
Installer represents the installer logic. It serves as the entrypoint to all installation methods.
type Manifest ¶
type Manifest struct {
PartitionOptions *runtime.PartitionOptions
Devices map[string]Device
Targets map[string][]*Target
LegacyBIOSSupport bool
}
Manifest represents the instructions for preparing all block devices for an installation.
func NewManifest ¶
func NewManifest(label string, sequence runtime.Sequence, bootPartitionFound bool, opts *Options) (manifest *Manifest, err error)
NewManifest initializes and returns a Manifest.
type Options ¶
type Options struct {
ConfigSource string
Disk string
Platform string
Arch string
Board string
ExtraKernelArgs []string
Bootloader bool
Upgrade bool
Force bool
Zero bool
LegacyBIOSSupport bool
}
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 install PreflightChecks.
func (*PreflightChecks) Close ¶
func (checks *PreflightChecks) Close() error
Close closes the client.
type PreserveSource ¶
type PreserveSource struct {
Label string
FnmatchFilters []string
FileSystemType partition.FileSystemType
}
PreserveSource instructs Talos where to look for source files to preserve.
type Target ¶
type Target struct {
*partition.FormatOptions
Device string
LegacyBIOSBootable bool
Assets []*Asset
// Preserve contents of the partition with the same label (if it exists).
PreserveContents bool
// Extra preserved locations (for upgrading from older versions of Talos).
//
// Used only if PreserveContents is true.
ExtraPreserveSources []PreserveSource
// Skip makes manifest skip any actions with the partition (creating, formatting).
//
// Skipped partitions should exist on the disk by the time manifest execution starts.
Skip bool
// set during execution
PartitionName string
Contents *bytes.Buffer
}
Target represents an installation partition.
func BIOSTarget ¶
BIOSTarget builds the default BIOS target.
func BootTarget ¶
BootTarget builds the default boot target.
func EphemeralTarget ¶
EphemeralTarget builds the default ephemeral target.
func MetaTarget ¶
MetaTarget builds the default meta target.
func ParseTarget ¶ added in v1.4.0
ParseTarget parses the target from the label and creates a required target.
func StateTarget ¶
StateTarget builds the default state target.
func (*Target) Partition ¶
func (t *Target) Partition(pt *gpt.GPT, pos int, bd *blockdevice.BlockDevice) (err error)
Partition creates a new partition on the specified device.
func (*Target) RestoreContents ¶
RestoreContents restores previously saved contents to the disk.
func (*Target) SaveContents ¶
func (t *Target) SaveContents(device Device, source *gpt.Partition, fileSystemType partition.FileSystemType, fnmatchFilters []string) error
SaveContents saves contents of partition to the target (in-memory).