repart

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: 14 Imported by: 0

Documentation

Index

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

func CreatePartitionConf(s *sys.System, wr io.Writer, p Partition) error

CreatePartitionConf writes a partition configuration for systemd-repart for the given partition into the given io.Writer

func CreatePartitionConfFile

func CreatePartitionConfFile(s *sys.System, filename string, p Partition) error

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
}

Jump to

Keyboard shortcuts

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