kernel

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoReboot

func AutoReboot(after time.Duration, callback func())

AutoReboot will start a timer and reboot after given duration

func Firmware

func Firmware() string

Firmware returns either efi or bios, depending on the boot method.

func ParseCmdline

func ParseCmdline() (map[string]string, error)

ParseCmdline will put each key=value pair from /proc/cmdline into a map.

func Reboot

func Reboot() error

Reboot reboots the the server

func RunKexec

func RunKexec(info *Bootinfo) error

RunKexec boot into the new kernel given in Bootinfo

func Watchdog

func Watchdog()

Watchdog periodically pings kernel software watchdog. from https://github.com/gokrazy/gokrazy

Types

type Bootinfo

type Bootinfo struct {
	Initrd       string `yaml:"initrd"`
	Cmdline      string `yaml:"cmdline"`
	Kernel       string `yaml:"kernel"`
	BootloaderID string `yaml:"bootloader_id"`
}

Bootinfo is written by the installer in the target os to tell us which kernel, initrd and cmdline must be used for kexec

func ReadBootinfo

func ReadBootinfo(file string) (*Bootinfo, error)

ReadBootinfo read boot-info.yaml which was written by the OS install.sh to get all information required to do kexec.

Jump to

Keyboard shortcuts

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