package
0.0.0-20240625190017-a0fef5fe53bc
Repository: https://github.com/clearlinux/clr-installer.git
Documentation: pkg.go.dev

# Functions

AddBootStandardPartition will add to disk a new standard Boot partition.
AddRootStandardPartition will add to disk a new standard Root partition.
AdvancedPartitionsRequireEncryption returns an array of validation error strings for the advanced partitions.
CreateSwapFile is responsible for generating a valid swapfile on the installation target.
DesktopValidateAdvancedPartitions returns an array of validation error strings for the advanced partitions based on a Desktop installation.
DesktopValidatePartitions returns an array of validation error strings for the partitions based on a Desktop installation.
DetachLoopDevice detaches a loop device.
FilterBlockDevices is a filter function which runs zero or more filter_func on every BlockDevice in the slice and returns a filtered slice which satisfies them all.
No description provided by the author
FindAllBlockDevices runs the filterfunc and returns a list of all blockdevices which satisfy the condition.
FindAllInstallTargets creates an order list of all possible installation targets There must be at least minSize free space on the disk.
FindBlockDeviceDepthFirst runs the filterfunc in depth first manner and returns the first child which shows certain property.
FindSafeInstallTargets creates an order list of possible installation targets Only disk with gpt partition are safe to use There must be at least 3 free partition in the table (gpt can have 127) There must be at least minSize free space on the disk.
FormatInstallPortion is the common code for describing the amount of disk used.
GenerateTabFiles creates the /etc mounting files if needed.
GetAdvancedPartitions returns an array of strings for the assigned advanced partitions used.
GetImpactOnOtherDisks informs whether actual installation should proceed or fail Only used when Performing destructive Installation.
GetPassPhrase prompts to the user interactively for the pass phrase via the command line.
GetPlannedMediaChanges returns an array of strings with all of disk and partition planned changes to advise the user before start.
HasAdvancedSwap check if the advanced media contain a swap partition.
HumanReadableSizeXB converts the size representation in bytes to the closest human readable format i.e 10M, 1G, 2T etc.
HumanReadableSizeXBWithPrecision converts the size representation in bytes to the closest human readable format i.e 10MB, 1GB, 2TB etc with a forced precision.
HumanReadableSizeXBWithUnit converts the size representation in bytes to the closest human readable format i.e 10MB, 1GB, 2TB etc with a forced unit.
HumanReadableSizeXBWithUnitAndPrecision converts the size representation in bytes to the closest human readable format i.e 10MB, 1GB, 2TB etc with a forced unit and precision.
HumanReadableSizeXiB converts the size representation in bytes to the closest human readable format i.e 10MiB, 1GiB, 2TiB etc.
HumanReadableSizeXiBWithPrecision converts the size representation in bytes to the closest human readable format i.e 10MiB, 1GiB, 2TiB etc with a forced precision.
HumanReadableSizeXiBWithUnit converts the size representation in bytes to the closest human readable format i.e 10MiB, 1GiB, 2TiB etc with a forced unit.
HumanReadableSizeXiBWithUnitAndPrecision converts the size representation in bytes to the closest human readable format i.e 10MiB, 1GiB, 2TiB etc with a forced unit and precision.
IsBlockDevAvailable is a function to test availability of a block device.
IsValidPassphrase checks the minimum passphrase requirements.
ListAvailableBlockDevices Lists only available block devices where available means block devices not mounted or not in use by the host system userDefined will be inserted in the resulting list rather the loaded ones.
ListBlockDevices Lists all block devices userDefined will be inserted in the resulting list reather the loaded ones.
MakeImage create an image file considering the total block device size.
MaxLabelLength returns the maximum length of a label for the given file system type.
MountMetaFs mounts proc, sysfs and devfs in the target installation directory.
NewStandardPartitions will add to disk a new set of partitions representing a default set of partitions required for an installation.
ParseVolumeSize will parse a string formatted (1M, 10GiB, 2TB) size and return its representation in bytes Units without suffix 'B' or 'iB' are assumed to be powers of 10 to ensure consistency with existing YAML files.
PrepareInstallationMedia updates all of the installation medias to ensure installation can proceed.
RescanBlockDevices clears current list available block devices and rescans.
ServerValidateAdvancedPartitions returns an array of validation error strings for the advanced partitions based on a Server installation.
ServerValidatePartitions returns an array of validation error strings for the partitions based on a Server installation.
SetupLoopDevice sets up a loop device and return the loop device path.
UmountAll unmounts all previously mounted devices.
UpdateBlockDevices updates the Label and UUID information only for existing available block devices.

# Constants

AddPartitionInfo specifies the warning message for removing a media partition.
BlockDeviceStateConnected identifies a BlockDevice as Connected.
BlockDeviceStateLive identifies a BlockDevice as live.
BlockDeviceStateRunning identifies a BlockDevice as running.
BlockDeviceStateSuspended identifies a BlockDevice as Suspended.
BlockDeviceStateUnknown identifies a BlockDevice in a unknown state.
BlockDeviceTypeCrypt identifies a BlockDevice as an encrypted partition (created with cryptsetup).
BlockDeviceTypeDisk identifies a BlockDevice as a disk.
BlockDeviceTypeLoop identifies a BlockDevice as a loop device (created with losetup).
BlockDeviceTypeLVM2Group identifies a BlockDevice as a lvm2 group.
BlockDeviceTypeLVM2Volume identifies a BlockDevice as a lvm2 volume.
BlockDeviceTypePart identifies a BlockDevice as a partition.
BlockDeviceTypeRAID0 identifies a BlockDevice as a RAID0.
BlockDeviceTypeRAID1 identifies a BlockDevice as a RAID1.
BlockDeviceTypeRAID10 identifies a BlockDevice as a RAID10.
BlockDeviceTypeRAID4 identifies a BlockDevice as a RAID4.
BlockDeviceTypeRAID5 identifies a BlockDevice as a RAID5.
BlockDeviceTypeRAID6 identifies a BlockDevice as a RAID6.
BlockDeviceTypeRom identifies a BlockDevice as a rom.
BlockDeviceTypeUnknown identifies a BlockDevice as unknown.
ConfirmInstallation specifies the installation warning title.
DataLossWarning specifies the warning message for data loss installation.
DestructiveWarning specifies the warning message for destructive installation.
EncryptCipher use for LUKS encryption.
EncryptHash use for LUKS encryption.
EncryptionPassphrase specifies the title for encryption passphrase dialog.
EncryptKeySize use for LUKS encryption.
FailedPartitionWarning specifies the warning message when we can not find partitions.
FormatPartitionInfo specifies the warning message for formatting a media partition.
KernelArgument is kernel argument needed if encrypted partitions are used.
LegacyModeWarning specifies the warning message we are using legacy bios mode.
LegacyNoBootWarning specifies the warning message we are using legacy bios mode and there is not /boot partition; so will NOT be able to boot in EFI mode.
LogicalVolumeWarning specifies the warning message when removing a logical volume.
MaxPassphraseLength is the shortest possible password.
MediaToBeUsed identified a disk which will be used during the installation.
20GB.
MinimumPartitionSize is smallest size for any partition.
4GB.
MinPassphraseLength is the shortest possible password.
PartitioningWarning specifies the warning message for writing partition table.
PassphraseMessage specifies the text for encryption passphrase dialog.
RemoveParitionWarning specifies the warning message for removing a media partition.
RequiredBundle the bundle needed if encrypted partitions are used.
RequiredBundleLVM the bundle needed if lvm partitions are used other than root.
SafePartialWarning specifies the warning message for partial disk partition.
SafeWholeWarning specifies the warning message for whole disk partition.
SwapfileName is the default name of the swap file to create.
UsePartitionInfo specifies the warning message for reusing a media partition.

# Variables

BlockDeviceTypeLVM2GroupString is a string version for LVM2 member type.
No description provided by the author

# Structs

A BlockDevice describes a block device and its partitions.
DryRunType to hold results of dryrun from calling WritePartitionTable.
InstallTarget describes a BlockDevice which is a valid installation target.
MediaOpts group the set of media related options.
PartedPartition hold partition information Number 0 and FileSystem "free" are free spaces.

# Type aliases

BlockDevFilterFunc is a type for all filter functions.
BlockDeviceState is the representation of a block device state (live, running, etc).
BlockDeviceType is the representation of a block device type (disk, part, rom, etc).
ByBDName implements sort.Interface for []*BlockDevice based on the Name field.