grub

package
v0.10.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BootA is a bootloader label.
	BootA = "A"

	// BootB is a bootloader label.
	BootB = "B"

	// GrubConfig is the path to the grub config.
	GrubConfig = constants.BootMountPoint + "/grub/grub.cfg"

	// GrubDeviceMap is the path to the grub device map.
	GrubDeviceMap = constants.BootMountPoint + "/grub/device.map"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	Default  string
	Fallback string
	Labels   []*Label
}

Cfg reprsents the cfg file.

type Grub

type Grub struct {
	BootDisk string
}

Grub represents the grub bootloader.

func (*Grub) Default

func (g *Grub) Default(label string) (err error)

Default implements the bootloader interface.

func (*Grub) Install

func (g *Grub) Install(fallback string, config interface{}, sequence runtime.Sequence) (err error)

Install implements the Bootloader interface. It sets up grub with the specified kernel parameters.

func (*Grub) Labels

func (g *Grub) Labels() (current, next string, err error)

Labels implements the Bootloader interface.

type Label

type Label struct {
	Root   string
	Kernel string
	Initrd string
	Append string
}

Label reprsents a label in the cfg file.

Jump to

Keyboard shortcuts

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