package
2.3.0-dev
Repository: https://github.com/rancher/elemental-toolkit.git
Documentation: pkg.go.dev

# Functions

ApplySELinuxLabels relables with setfiles the given root in a chroot env.
CheckActiveDeployment returns true if at least one of the mode sentinel files is found.
CopyCloudConfig will check if there is a cloud init in the config and store it on the target.
CopyFileImg copies the files target as the source of this image.
CreateFileSystemImage creates the image file for the given image.
CreateImageFromTree creates the given image including the given root tree.
DeactivateDevice deactivates unmounted the block devices present within the system.
DeployRecoverySystem deploys the rootfs image from the img parameter and extracts kernel+initrd to the same directory.
DumpSource dumps the imgSrc data to target.
FormatPartition will format an already existing partition.
GetTempDir returns the dir for storing related temporal files It will respect TMPDIR and use that if exists, fallback to try the persistent partition if its mounted and finally the default /tmp/ dir suffix is what is appended to the dir name elemental-suffix.
IsActiveMode checks if the active mode sentinel file exists.
Is Mounted checks if the given partition is mounted or not.
IsPassiveMode checks if the passive mode sentinel file exists.
IsRecoveryMode checks if the recovery mode sentinel file exists.
No description provided by the author
MirrorRoot mirrors image source contents to target.
MountFileSystemImage mounts an image with the given mount options.
MountPartition mounts a partition with the given mount options.
MountPartitions mounts configured partitions.
MountRWPartition mounts, or remounts if needed, a partition with RW permissions.
PartitionAndFormatDevice creates a new empty partition table on target disk and applies the configured disk layout by creating and formatting all required partitions.
SelinuxRelabel will relabel the system if it finds the binary and the context.
SourceISO downloads an ISO in a temporary folder, mounts it and returns the image source to be used Returns a source and cleaner method to unmount and remove the temporary folder afterwards.
UnmountFilesystemImage unmounts the given image or does nothing if not mounted.
UnmountPartition unmounts the given partition or does nothing if not mounted.
UnmountPartitions unmounts configured partitions.