Version: v0.0.0-...-ed07a65 Latest Latest

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

Go to latest
Published: Sep 19, 2019 License: BSD-3-Clause Imports: 11 Imported by: 0



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



This section is empty.


This section is empty.


func Execute

func Execute() error

Execute executes a previously loaded OSImage.

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


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 {

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