Documentation ¶
Index ¶
- Constants
- func CreateLuks(dev, password, version string, cryptsetupArgs ...string) error
- func ExtractInitrd(initrd string, dst string) error
- func FindPartition(label string) (string, *block.Partition, error)
- func GetPassword(b *block.Partition) (password string, err error)
- func InjectInitrd(initrd string, file, dst string) error
- func LuksUnlock(device, mapper, password string) error
- func Luksify(label, version string, tpm bool) (string, error)
- func SH(c string) (string, error)
- func UnlockAll(tpm bool) error
- func UnlockAllWithLogger(tpm bool, logger zerolog.Logger) error
- func UnlockDisk(b *block.Partition) error
- func Waitdevice(device string, attempts int) error
Constants ¶
const ( GZType = "gz" XZType = "xz" LZMAType = "lzma" )
Variables ¶
This section is empty.
Functions ¶
func CreateLuks ¶ added in v0.8.0
func ExtractInitrd ¶ added in v0.8.0
func FindPartition ¶ added in v0.8.0
func GetPassword ¶
GetPassword gets the password for a block.Partition TODO: Ask to discovery a pass to unlock. keep waiting until we get it and a timeout is exhausted with retrials (exp backoff)
func InjectInitrd ¶ added in v0.8.0
func LuksUnlock ¶
func Luksify ¶ added in v0.8.0
Luksify Take a part label, and recreates it with LUKS. IT OVERWRITES DATA! On success, it returns a machine parseable string with the partition information (label:name:uuid) so that it can be stored by the caller for later use. This is because the label of the encrypted partition is not accessible unless the partition is decrypted first and the uuid changed after encryption so any stored information needs to be updated (by the caller).
func UnlockAllWithLogger ¶ added in v0.10.0
func UnlockDisk ¶
UnlockDisk unlocks a single block.Partition
func Waitdevice ¶ added in v0.8.0
Types ¶
This section is empty.