Documentation ¶
Index ¶
- func WithGrubClearBootEntry(clearBootEntry bool) func(g *Grub) error
- func WithGrubDisableBootEntry(disableBootEntry bool) func(g *Grub) error
- func WithGrubPrefix(prefix string) func(g *Grub) error
- func WithSecureBoot(secureboot bool) func(g *Grub) error
- type Grub
- func (g *Grub) CreateEntry(shimName string, relativeTo string, efiVariables eleefi.Variables) error
- func (g *Grub) DoEFIEntries(shimName, efiDir string) error
- func (g *Grub) Install(rootDir, bootDir, deviceLabel string) (err error)
- func (g Grub) InstallConfig(rootDir, bootDir string) error
- func (g *Grub) InstallEFI(rootDir, bootDir, efiDir, deviceLabel string) error
- func (g *Grub) InstallEFIElementalBinaries(rootDir, efiDir, _ string) error
- func (g *Grub) InstallEFIFallbackBinaries(rootDir, efiDir, _ string) error
- func (g *Grub) SetDefaultEntry(partMountPoint, imgMountPoint, defaultEntry string) error
- func (g *Grub) SetPersistentVariables(grubEnvFile string, vars map[string]string) error
- type GrubOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithGrubClearBootEntry ¶
func WithGrubPrefix ¶
func WithSecureBoot ¶
Types ¶
type Grub ¶
type Grub struct {
// contains filtered or unexported fields
}
func (*Grub) CreateEntry ¶
createBootEntry will create an entry in the efi vars for our shim and set it to boot first in the bootorder
func (*Grub) DoEFIEntries ¶
DoEFIEntries creates clears any previous entry if requested and creates a new one with the given shim name.
func (*Grub) Install ¶
Install installs grub into the device, copy the config file and add any extra TTY to grub
func (Grub) InstallConfig ¶
InstallConfig installs grub configuraton files to the expected location. rootDir is the root of the OS image, bootDir is the folder grub read the configuration from, usually EFI partition mountpoint
func (*Grub) InstallEFI ¶
func (*Grub) InstallEFIElementalBinaries ¶
func (*Grub) InstallEFIFallbackBinaries ¶
func (*Grub) SetDefaultEntry ¶
SetDefaultEntry Sets the default_meny_entry value in RunConfig.GrubOEMEnv file at in State partition mountpoint. If there is not a custom value in the os-release file, we do nothing As the grub config already has a sane default