boot

package
v6.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 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 {
	Kernel  io.ReaderAt
	Initrd  io.ReaderAt
	Cmdline string
}

LinuxImage implements OSImage for a Linux kernel + initramfs.

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 {
	Path    string
	Cmdline string
	Modules []string
	IBFT    *ibft.IBFT
}

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

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

	// 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.

Jump to

Keyboard shortcuts

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