bootloader

package
v3.0.0-alpha.20251205 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BootNone = "none"
	BootGrub = "grub"
)
View Source
const (
	OsReleasePath  = "/etc/os-release"
	Initrd         = "initrd"
	DefaultBootID  = "active"
	RecoveryBootID = "recovery"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootloader

type Bootloader interface {
	Install(rootPath, espDir, espLabel, entryID, kernelCmdline, recKernelCmdline string) error
	InstallLive(rootPath, espDir, kernelCmdline string) error
	Prune(rootPath, espDir string, keepEntryIDs []int) error
}

func New

func New(name string, s *sys.System) (Bootloader, error)

type Grub

type Grub struct {
	// contains filtered or unexported fields
}

func NewGrub

func NewGrub(s *sys.System, opts ...Option) *Grub

func (*Grub) Install

func (g *Grub) Install(rootPath, espDir, espLabel, entryID, kernelCmdline, recKernelCmdline string) error

Install installs the bootloader to the specified root.

func (*Grub) InstallLive

func (g *Grub) InstallLive(rootPath, target, kernelCmdLine string) error

InstallLive installs the live bootloader to the specified target.

func (Grub) Prune

func (g Grub) Prune(rootPath, espDir string, keepSnapshotIDs []int) (err error)

Prune prunes old boot entries and artifacts not in the passed in keepSnapshotIDs.

type None

type None struct {
	// contains filtered or unexported fields
}

func NewNone

func NewNone(s *sys.System) *None

func (*None) Install

func (n *None) Install(_, _, _, _, _, _ string) error

func (*None) InstallLive

func (n *None) InstallLive(_, _, _ string) error

func (*None) Prune

func (n *None) Prune(_, _ string, _ []int) error

type Option

type Option func(*Grub)

Jump to

Keyboard shortcuts

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