Documentation
¶
Index ¶
- func CreateDiskImage(s *sys.System, filename string, size deployment.MiB, partitions []Partition) error
- func CreatePartitionConf(s *sys.System, wr io.Writer, p Partition) error
- func CreatePartitionConfFile(s *sys.System, filename string, p Partition) error
- func PartitionAndFormatDevice(s *sys.System, d *deployment.Disk) error
- func ReconcileDevicePartitions(s *sys.System, d *deployment.Disk) error
- type Partition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDiskImage ¶
func CreateDiskImage(s *sys.System, filename string, size deployment.MiB, partitions []Partition) error
CreateDiskImage creates a disk image file with the given size and partitions
func CreatePartitionConf ¶
CreatePartitionConf writes a partition configuration for systemd-repart for the given partition into the given io.Writer
func CreatePartitionConfFile ¶
CreatePartitionConfFile writes a partition configuration for systemd-repart for the given partition into the given file
func PartitionAndFormatDevice ¶
func PartitionAndFormatDevice(s *sys.System, d *deployment.Disk) error
PartitionAndFormatDevice creates a new empty partition table on target disk and applies the configured disk layout by creating and formatting all required partitions.
func ReconcileDevicePartitions ¶
func ReconcileDevicePartitions(s *sys.System, d *deployment.Disk) error
ReconcileDevicePartitions attempts to match the given disk layout with the current device. It attempts to extend an existing partition table or create a new one if none exists. It does not remove any pre-existing partition.
Types ¶
type Partition ¶
type Partition struct {
Partition *deployment.Partition
// CopyFiles is list of paths to copy into the partition, uses CopyFiles syntax as defined
// in repart.d(5) man pages
CopyFiles []string
// Excludes is a list of paths to exclude from the host to be copied into the partition, uses
// ExcludeFiles syntax as defined in repart.d(5) man pages
Excludes []string
}