Documentation ¶
Overview ¶
Package grub provides the interface to the GRUB bootloader: config management, installation, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootLabel ¶ added in v1.0.0
type BootLabel string
BootLabel represents a boot label, e.g. A or B.
const ( // BootA is a bootloader label. BootA BootLabel = "A" // BootB is a bootloader label. BootB BootLabel = "B" // ConfigPath is the path to the grub config. ConfigPath = constants.BootMountPoint + "/grub/grub.cfg" )
func FlipBootLabel ¶ added in v1.0.0
FlipBootLabel flips the boot entry, e.g. A -> B, B -> A.
func ParseBootLabel ¶ added in v1.0.0
ParseBootLabel parses the given human-readable boot label to a grub.BootLabel.
type Config ¶ added in v1.0.0
Config represents a grub configuration file (grub.cfg).
func NewConfig ¶ added in v1.0.0
NewConfig creates a new grub configuration (nothing is written to disk).
func (*Config) Install ¶ added in v1.0.0
Install validates the grub configuration and writes it to the disk.
Click to show internal directories.
Click to hide internal directories.