install

package
v0.1.0-alpha.19 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2019 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(data *userdata.UserData) (err error)

Install fetches the necessary data locations and copies or extracts to the target locations nolint: gocyclo

func Mount

func Mount() (err error)

Mount discovers the appropriate partitions by label and mounts them up to the appropriate mountpoint. TODO: See if we can consolidate this with rootfs/mount

func Prepare

func Prepare(data *userdata.UserData) (err error)

Prepare handles setting/consolidating/defaulting userdata pieces specific to installation TODO: See if this would be more appropriate in userdata nolint: dupl, gocyclo

Types

type Device

type Device struct {
	DataURLs  []string
	Label     string
	MountBase string
	Name      string

	// This seems overkill to save partition table
	// when we can get partition table from BlockDevice
	// but we want to have a shared partition table for each
	// device so we can properly append partitions and have
	// an atomic write partition operation
	PartitionTable table.PartitionTable

	// This guy might be overkill but we can clean up later
	// Made up of Name + part.No(), so maybe it's worth
	// just storing part.No() and adding a method d.PartName()
	PartitionName string

	Size uint

	BlockDevice *blockdevice.BlockDevice

	Force bool
	Test  bool
}

Device represents a single partition.

func NewDevice

func NewDevice(name string, label string, size uint, force bool, test bool, data []string) *Device

NewDevice creates a Device with basic metadata. BlockDevice and PartitionTable need to be set outsite of this.

func (*Device) Format

func (d *Device) Format() error

Format creates a xfs filesystem on the device/partition

func (*Device) Partition

func (d *Device) Partition() error

Partition creates a new partition on the specified device nolint: dupl

Jump to

Keyboard shortcuts

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