boot

package
v0.0.0-...-ba47a78 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package boot is the high-level interface for booting another operating system from Linux using kexec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute executes a previously loaded OSImage.

This will only work if OSImage.Load was called on some OSImage.

Types

type LinuxImage

type LinuxImage struct {
	Name string

	Kernel  io.ReaderAt
	Initrd  io.ReaderAt
	Cmdline string
}

LinuxImage implements OSImage for a Linux kernel + initramfs.

func (*LinuxImage) Label

func (li *LinuxImage) Label() string

Label returns either the Name or a short description.

func (*LinuxImage) Load

func (li *LinuxImage) Load(verbose bool) error

Load implements OSImage.Load and kexec_load's the kernel with its initramfs.

func (*LinuxImage) String

func (li *LinuxImage) String() string

String prints a human-readable version of this linux image.

type MultibootImage

type MultibootImage struct {
	Name string

	Kernel  io.ReaderAt
	Cmdline string
	Modules []multiboot.Module
	IBFT    *ibft.IBFT
}

MultibootImage is a multiboot-formated OSImage, such as ESXi, Xen, Akaros, tboot.

func (*MultibootImage) Label

func (mi *MultibootImage) Label() string

Label returns either Name or a short description.

func (*MultibootImage) Load

func (mi *MultibootImage) Load(verbose bool) error

Load implements OSImage.Load.

func (*MultibootImage) String

func (mi *MultibootImage) String() string

String implements fmt.Stringer.

type OSImage

type OSImage interface {
	fmt.Stringer

	// Label is a name or short description for this OSImage.
	//
	// Label is intended for boot menus.
	Label() string

	// Load loads the OS image into kernel memory, ready for execution.
	//
	// After Load is called, call boot.Execute() to stop Linux and boot the
	// loaded OSImage.
	Load(verbose bool) error
}

OSImage represents a bootable OS package.

Directories

Path Synopsis
Package acpi can find and parse the RSDP pointer and struct.
Package acpi can find and parse the RSDP pointer and struct.
Package ebda looks for the Extended Bios Data Area (EBDA) pointer in /dev/mem, and provides access to the EBDA.
Package ebda looks for the Extended Bios Data Area (EBDA) pointer in /dev/mem, and provides access to the EBDA.
Package esxi contains an ESXi boot config parser for disks and CDROMs.
Package esxi contains an ESXi boot config parser for disks and CDROMs.
Package ibft defines the iSCSI Boot Firmware Table.
Package ibft defines the iSCSI Boot Firmware Table.
Package multiboot implements bootloading multiboot kernels as defined by https://www.gnu.org/software/grub/manual/multiboot/multiboot.html.
Package multiboot implements bootloading multiboot kernels as defined by https://www.gnu.org/software/grub/manual/multiboot/multiboot.html.
internal/trampoline
Package trampoline sets machine to a specific state defined by multiboot v1 spec and jumps to the intended kernel.
Package trampoline sets machine to a specific state defined by multiboot v1 spec and jumps to the intended kernel.
Package netboot provides a one-stop shop for netboot parsing needs.
Package netboot provides a one-stop shop for netboot parsing needs.
ipxe
Package ipxe implements a trivial IPXE config file parser.
Package ipxe implements a trivial IPXE config file parser.
pxe
Package pxe implements the PXE config file parsing.
Package pxe implements the PXE config file parsing.
Package syslinux implements a syslinux config file parser.
Package syslinux implements a syslinux config file parser.

Jump to

Keyboard shortcuts

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