Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Log zerolog.Logger
Functions ¶
func DetectUKIboot ¶ added in v0.0.25
Detects if we are on uki mode
func EfiBootFromInstall ¶ added in v0.0.25
EfiBootFromInstall will try to check the /sys/firmware/efi/LoaderDevicePartUUID-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f systemd vendor Id is 4a67b082-0a4c-41cf-b6c7-440b29bb8c4f and will never change LoaderDevicePartUUID contains the partition UUID of the EFI System Partition the boot loader was run from. Set by the boot loader. This will return true if we are running from a DISK device, which sets the efivar This wil return false when running from a volatile media, like CD or netboot as it cannot infer where it was booted from Useful to check if we are on install phase or not This efi var is VOLATILE so once we reboot is GONE. No way of keeping it across reboots, its set by the bootloader.
Types ¶
type EncryptedParts ¶ added in v0.1.3
type EncryptedParts struct { ByLabel map[string]PartitionState `yaml:"by_label,omitempty" json:"by_label,omitempty"` ByDevice map[string]PartitionState `yaml:"by_device,omitempty" json:"by_device,omitempty"` }
type Lsblk ¶ added in v0.0.7
type Lsblk struct { BlockDevices []struct { Path string `json:"path,omitempty"` Mountpoint string `json:"mountpoint,omitempty"` FsType string `json:"fstype,omitempty"` Size string `json:"size,omitempty"` Label string `json:"label,omitempty"` RO bool `json:"ro,omitempty"` } `json:"blockdevices,omitempty"` }
Lsblk is the struct to marshal the output of lsblk
type PartitionState ¶
type PartitionState struct { Mounted bool `yaml:"mounted" json:"mounted"` Name string `yaml:"name" json:"name"` Label string `yaml:"label" json:"label"` FilesystemLabel string `yaml:"filesystemlabel" json:"filesystemlabel"` MountPoint string `yaml:"mount_point" json:"mount_point"` SizeBytes uint64 `yaml:"size_bytes" json:"size_bytes"` Type string `yaml:"type" json:"type"` IsReadOnly bool `yaml:"read_only" json:"read_only"` Found bool `yaml:"found" json:"found"` UUID string `yaml:"uuid" json:"uuid"` // This would be volume UUID on macOS, PartUUID on linux, empty on Windows }
type Runtime ¶
type Runtime struct { UUID string `yaml:"uuid" json:"uuid"` Persistent PartitionState `yaml:"persistent" json:"persistent"` Recovery PartitionState `yaml:"recovery" json:"recovery"` OEM PartitionState `yaml:"oem" json:"oem"` State PartitionState `yaml:"state" json:"state"` EncryptedPartitions EncryptedParts `yaml:"encrypted_partitions,omitempty" json:"encrypted_partitions,omitempty"` BootState Boot `yaml:"boot" json:"boot"` System sysinfo.SysInfo `yaml:"system" json:"system"` Kairos Kairos `yaml:"kairos" json:"kairos"` }