Versions in this module Expand all Collapse all v0 v0.1.0 Nov 12, 2022 v0.0.1 Nov 10, 2022 Changes in this version + var ErrBootloader = errors.New("cannot determine bootloader") + var ErrNoTryKernelRef = errors.New("no try-kernel referenced") + func Force(booloader Bootloader) + func ForceError(err error) + func InstallBootConfig(gadgetDir, rootDir string, opts *Options) error + type BootFile struct + Path string + Role Role + Snap string + func NewBootFile(snap, path string, role Role) BootFile + func (b BootFile) WithPath(path string) BootFile + type Bootloader interface + ExtractKernelAssets func(s snap.PlaceInfo, snapf snap.Container) error + GetBootVars func(names ...string) (map[string]string, error) + InstallBootConfig func(gadgetDir string, opts *Options) error + Name func() string + Present func() (bool, error) + RemoveKernelAssets func(s snap.PlaceInfo) error + SetBootVars func(values map[string]string) error + func Find(rootdir string, opts *Options) (Bootloader, error) + func ForGadget(gadgetDir, rootDir string, opts *Options) (Bootloader, error) + type CommandLineComponents struct + ExtraArgs string + FullArgs string + ModeArg string + SystemArg string + func (c *CommandLineComponents) Validate() error + type ExtractedRecoveryKernelImageBootloader interface + ExtractRecoveryKernelAssets func(recoverySystemDir string, s snap.PlaceInfo, snapf snap.Container) error + type ExtractedRunKernelImageBootloader interface + DisableTryKernel func() error + EnableKernel func(snap.PlaceInfo) error + EnableTryKernel func(snap.PlaceInfo) error + Kernel func() (snap.PlaceInfo, error) + TryKernel func() (snap.PlaceInfo, error) + type NotScriptableBootloader interface + SetBootVarsFromInitramfs func(values map[string]string) error + type Options struct + NoSlashBoot bool + PrepareImageTime bool + Role Role + type RebootBootloader interface + GetRebootArguments func() (string, error) + type RecoveryAwareBootloader interface + GetRecoverySystemEnv func(recoverySystemDir string, key string) (string, error) + SetRecoverySystemEnv func(recoverySystemDir string, values map[string]string) error + type Role string + const RoleRecovery + const RoleRunMode + const RoleSole + type TrustedAssetsBootloader interface + BootChain func(runBl Bootloader, kernelPath string) ([]BootFile, error) + CandidateCommandLine func(pieces CommandLineComponents) (string, error) + CommandLine func(pieces CommandLineComponents) (string, error) + ManagedAssets func() []string + RecoveryBootChain func(kernelPath string) ([]BootFile, error) + TrustedAssets func() ([]string, error) + UpdateBootConfig func() (bool, error)