boot

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMemfdFromReader

func CreateMemfdFromReader(name string, reader io.Reader) (*os.File, error)

CreateMemfdFromReader creates an anonymous file in memory via memfd_create and copies data from reader.

func HandleNo5LVLWorkaround

func HandleNo5LVLWorkaround()

HandleNo5LVLWorkaround adds "no5lvl" to GRUB config and reboots to disable 5-level paging, which is incompatible with the Talos kernel (compiled without CONFIG_X86_5LEVEL).

After the reboot the user must re-run boot-to-talos.

func Is5LevelPagingActive

func Is5LevelPagingActive() bool

Is5LevelPagingActive detects if the host kernel uses 5-level page tables (LA57).

5-level paging extends the virtual address space from 48-bit (4-level) to 57-bit. Detection works by attempting mmap at an address above the 4-level canonical limit (2^48). If the mapping succeeds, the kernel is using 5-level page tables.

This matters for kexec: if the host runs 5-level paging but the target kernel (Talos) is compiled without CONFIG_X86_5LEVEL, the kexec handoff will triple-fault because the target decompressor cannot handle the 5→4 level paging transition.

func KexecLoadFromAssets

func KexecLoadFromAssets(assets *types.BootAssets, extraCmdline string) error

KexecLoadFromAssets loads kernel via kexec_file_load syscall from BootAssets.

func RunBootMode

func RunBootMode(source types.ImageSource, extraArgs []string)

RunBootMode executes boot mode: shows summary, asks confirmation, loads kernel via kexec.

Types

This section is empty.

Jump to

Keyboard shortcuts

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