sdboot

package
v1.10.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package sdboot provides the interface to the Systemd-Boot bootloader: config management, installation, etc.

Index

Constants

View Source
const (
	// SystemdBootGUIDString is the GUID of the SystemdBoot EFI variables.
	SystemdBootGUIDString = "4a67b082-0a4c-41cf-b6c7-440b29bb8c4f"
	// SystemdBootStubInfoPath is the path to the SystemdBoot StubInfo EFI variable.
	SystemdBootStubInfoPath = constants.EFIVarsMountPoint + "/" + "StubInfo-" + SystemdBootGUIDString
)
View Source
const (
	LoaderEntryDefaultName  = "LoaderEntryDefault"
	LoaderEntrySelectedName = "LoaderEntrySelected"
	LoaderConfigTimeoutName = "LoaderConfigTimeout"
)

Variable names.

Variables

SystemdBootGUID is the GUID of the SystemdBoot EFI variables.

Functions

func IsBootedUsingSDBoot

func IsBootedUsingSDBoot() bool

IsBootedUsingSDBoot returns true if the system is booted using sd-boot.

func ReadVariable

func ReadVariable(c efivario.Context, name string) (string, error)

ReadVariable reads a SystemdBoot EFI variable.

func WriteVariable

func WriteVariable(c efivario.Context, name, value string) error

WriteVariable reads a SystemdBoot EFI variable.

Types

type Config

type Config struct {
	Default  string
	Fallback string
}

Config describe sd-boot state.

func New

func New() *Config

New creates a new sdboot bootloader config.

func Probe

func Probe(disk string, options options.ProbeOptions) (*Config, error)

Probe for existing sd-boot bootloader.

func (*Config) Install

func (c *Config) Install(opts options.InstallOptions) (*options.InstallResult, error)

Install the bootloader.

func (*Config) RequiredPartitions added in v1.8.0

func (c *Config) RequiredPartitions() []partition.Options

RequiredPartitions returns the list of partitions required by the bootloader.

func (*Config) Revert

func (c *Config) Revert(disk string) error

Revert the bootloader to the previous version.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL