u-root: github.com/u-root/u-root/pkg/boot Index | Files | Directories

package boot

import "github.com/u-root/u-root/pkg/boot"

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

Index

Package Files

boot.go linux.go multiboot.go

func Execute Uses

func Execute() error

Execute executes a previously loaded OSImage.

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

type LinuxImage Uses

type LinuxImage struct {
    Name string

    Kernel  io.ReaderAt
    Initrd  io.ReaderAt
    Cmdline string
}

LinuxImage implements OSImage for a Linux kernel + initramfs.

func (*LinuxImage) Label Uses

func (li *LinuxImage) Label() string

Label returns either the Name or a short description.

func (*LinuxImage) Load Uses

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

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

func (*LinuxImage) String Uses

func (li *LinuxImage) String() string

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

type MultibootImage Uses

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 Uses

func (mi *MultibootImage) Label() string

Label returns either Name or a short description.

func (*MultibootImage) Load Uses

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

Load implements OSImage.Load.

func (*MultibootImage) String Uses

func (mi *MultibootImage) String() string

String implements fmt.Stringer.

type OSImage Uses

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

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

Package boot imports 11 packages (graph) and is imported by 19 packages. Updated 2020-04-08. Refresh now. Tools for package owners.