Documentation ¶
Overview ¶
Package grub implements a grub config file parser.
See the grub manual https://www.gnu.org/software/grub/manual/grub/ for a reference of the configuration format In particular the following pages: - https://www.gnu.org/software/grub/manual/grub/html_node/Shell_002dlike-scripting.html - https://www.gnu.org/software/grub/manual/grub/html_node/Commands.html
See parser.append function for list of commands that are supported.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseConfigFile ¶
func ParseConfigFile(ctx context.Context, s curl.Schemes, configFile string, root *url.URL, devices block.BlockDevices, mountPool *mount.Pool) ([]boot.OSImage, error)
ParseConfigFile parses a grub configuration as specified in https://www.gnu.org/software/grub/manual/grub/
See parser.append function for list of commands that are supported.
`root` is the default scheme, host, and path for any files named as a relative path - e.g. kernel and initramfs paths are requested relative to the root.
Types ¶
type EnvFile ¶
EnvFile is a GRUB environment file consisting of key-value pairs akin to the GRUB commands load_env and save_env.
func ParseEnvFile ¶
ParseEnvFile reads a key-value pair GRUB environment file.
ParseEnvFile accepts incorrectly padded GRUB env files, as opposed to GRUB.