bootloader

package
v1.10.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package bootloader provides bootloader implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupBootloader

func CleanupBootloader(disk string, sdboot bool) error

CleanupBootloader cleans up the alternate bootloader when booting off via BIOS or UEFI.

Types

type Bootloader

type Bootloader interface {
	// Install the bootloader.
	//
	// Install mounts the partitions as required.
	Install(options options.InstallOptions) (*options.InstallResult, error)
	// Revert reverts the bootloader entry to the previous state.
	//
	// Revert mounts the partitions as required.
	Revert(disk string) error
	// RequiredPartitions returns the required partitions for the bootloader.
	RequiredPartitions() []partition.Options

	// KexecLoad does a kexec_file_load using the current entry of the bootloader.
	KexecLoad(r runtime.Runtime, disk string) error
}

Bootloader describes a bootloader.

func New added in v1.5.0

func New(bootloader, talosVersion, arch string) (Bootloader, error)

New returns a new bootloader based on the secureboot flag and architecture.

func NewAuto added in v1.5.0

func NewAuto() Bootloader

NewAuto returns a new bootloader based on auto-detection.

func Probe added in v1.5.0

func Probe(disk string, options options.ProbeOptions) (Bootloader, error)

Probe checks if any supported bootloaders are installed.

Returns nil if it cannot detect any supported bootloader.

Directories

Path Synopsis
Package dual provides dual-boot bootloader implementation.
Package dual provides dual-boot bootloader implementation.
Package grub provides the interface to the GRUB bootloader: config management, installation, etc.
Package grub provides the interface to the GRUB bootloader: config management, installation, etc.
Package kexec call unix.KexecFileLoad with error handling.
Package kexec call unix.KexecFileLoad with error handling.
Package mount provides bootloader mount operations.
Package mount provides bootloader mount operations.
Package options provides bootloader options.
Package options provides bootloader options.
Package sdboot provides the interface to the Systemd-Boot bootloader: config management, installation, etc.
Package sdboot provides the interface to the Systemd-Boot bootloader: config management, installation, etc.

Jump to

Keyboard shortcuts

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