All Projects → systemboot → systemboot

systemboot / systemboot

Licence: BSD-3-Clause License
SystemBoot is a LinuxBoot distribution that works as a system firmware + bootloader, based on u-root

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to systemboot

Stm32 Bootloader
Customizable Bootloader for STM32 microcontrollers. This example demonstrates how to perform in-application-programming of a firmware located on an external SD card with FAT32 file system.
Stars: ✭ 541 (+425.24%)
Mutual labels:  firmware, boot, bootloader
Aio Boot
AIO Boot is an All-in-One bootable software for USB and HDD. Is one of the best Multiboot USB Creator for Windows.
Stars: ✭ 300 (+191.26%)
Mutual labels:  boot, uefi, bootloader
clr-boot-manager
Kernel & Boot Loader Management
Stars: ✭ 101 (-1.94%)
Mutual labels:  kernel, boot, uefi
Netboot.xyz
Your favorite operating systems in one place. A network-based bootable operating system installer based on iPXE.
Stars: ✭ 2,753 (+2572.82%)
Mutual labels:  dhcp, netboot, boot
efi
Ergonomic Rust framework for writing UEFI applications.
Stars: ✭ 44 (-57.28%)
Mutual labels:  dhcp, uefi, bootloader
GrubFM-Installer
GrubFM Installer
Stars: ✭ 27 (-73.79%)
Mutual labels:  boot, uefi
biefircate
Running x86-16 or x86-32 code from x86-64 UEFI; _very experimental_ • mirror of https://gitlab.com/tkchia/biefircate • developer notes at https://gitlab.com/tkchia/biefircate/-/blob/main/doc/NOTES.asciidoc
Stars: ✭ 47 (-54.37%)
Mutual labels:  kernel, uefi
SnowFlake
Technology is free, SnowFlakeOS
Stars: ✭ 38 (-63.11%)
Mutual labels:  kernel, uefi
UEFI-Boot
Boot Linux directly from UEFI firmware (without any bootloader)
Stars: ✭ 38 (-63.11%)
Mutual labels:  uefi, bootloader
arch-config
Scripts and Ansible playbook to setup Arch Linux on ZFS.
Stars: ✭ 36 (-65.05%)
Mutual labels:  netboot, boot
Arch
These are easy, in-depth instructions on how to install Arch Linux.
Stars: ✭ 16 (-84.47%)
Mutual labels:  boot, uefi
smram parse
System Management RAM analysis tool
Stars: ✭ 50 (-51.46%)
Mutual labels:  firmware, uefi
uefi-elf-bootloader
UEFI ELF Bootloader example
Stars: ✭ 40 (-61.17%)
Mutual labels:  uefi, bootloader
bananapi-zero-ubuntu-base-minimal
BananaPi M2 Zero - Ubuntu Focal Base Minimal Image (Experimental) - U-Boot 2017.09 / Kernel 4.18.y / Kernel 4.19.y / Kernel 4.20.y / Kernel 5.3.y / Kernel 5.6.y / Kernel 5.7.y / Kernel 5.11.y
Stars: ✭ 77 (-25.24%)
Mutual labels:  firmware, boot
mbr-boot-manager
💾 Master Boot Record with a boot menu written in Assembly
Stars: ✭ 57 (-44.66%)
Mutual labels:  boot, bootloader
CloverEFI-4MU
Manually install Clover EFI Bootloader via Linux System on Legacy BIOS or UEFI Firmware.
Stars: ✭ 93 (-9.71%)
Mutual labels:  uefi, bootloader
linux-4.x.y
Linux 4.4内核实践分析
Stars: ✭ 72 (-30.1%)
Mutual labels:  kernel, bootloader
HUANANZHI-X99-F8
CX99DE25 BIOS for HUANANZHI X99-F8 GAMING Motherboard 07/25/2020
Stars: ✭ 43 (-58.25%)
Mutual labels:  firmware, uefi
Mirage
Reimplementation of the Nintendo Switch firmware
Stars: ✭ 40 (-61.17%)
Mutual labels:  kernel, firmware
squashible
Cross-Platform Linux Live Image Builder
Stars: ✭ 22 (-78.64%)
Mutual labels:  netboot, boot

systemboot

Build Status codecov Go Report Card

Note: systemboot has been merged into u-root. This repository is now read-only and staying only for historical reasons, but you should build your bootloader entirely from u-root. How? The CLI tools have been moved under u-root/cmds/boot{fbnetboot,localboot,uinit}, the libraries under [u-root/pkg/]{bootconfig,booter,checker,crypto,recovery,rng,storage,vpd}. u-root/tools/vpdbootmanager and u-root/examples/fixmynetboot.

SystemBoot is a distribution for LinuxBoot to create a system firmware + bootloader. It is based on u-root. The provided programs are:

  • netboot: a network boot client that uses DHCP and HTTP to get a boot program based on Linux, and uses kexec to run it
  • localboot: a tool that finds bootable kernel configurations on the local disks and boots them
  • uinit: a wrapper around netboot and localboot that just mimicks a BIOS/UEFI BDS behaviour, by looping between network booting and local booting. The name uinit is necessary to be picked up as boot program by u-root.

This work is similar to the pxeboot and boot commands that are already part of u-root, but approach and implementation are slightly different. Thanks to Chris Koch and Jean-Marie Verdun for pioneering in this area.

This project started as a personal experiment under github.com/insomniacslk/systemboot but it is now an effort of a broader community and graduated to a real project for system firmwares.

The next sections go into further details.

netboot

The netboot client has the duty of configuring the network, downloading a boot program, and kexec'ing it. Optionally, the network configuration can be obtained via SLAAC and the boot program URL can be overridden to use a known endpoint.

In its DHCP-mode operation, netboot does the following:

  • bring up the selected network interface (eth0 by default)
  • make a DHCPv6 transaction asking for network configuration, DNS, and a boot file URL
  • extract network and DNS configuration from the DHCP reply and configure the interface
  • extract the boot file URL from the DHCP reply and download it. The only supported scheme at the moment is HTTP. No TFTP, sorry, it's 2018 (but I accept pull requests)
  • kexec the downloaded boot program

There is an additional mode that uses SLAAC and a known endpoint, that can be enabled with -skip-dhcp, -netboot-url, and a working SLAAC configuration.

localboot

The localboot program looks for bootable kernels on attached storage and tries to boot them in order, until one succeeds. In the future it will support a configurable boot order, but for that I need Google VPD support, which will come soon.

In the current mode, localboot does the following:

  • look for all the locally attached block devices
  • try to mount them with all the available file systems
  • look for a GRUB configuration on each mounted partition
  • look for valid kernel configurations in each GRUB config
  • try to boot (via kexec) each valid kernel/ramfs combination found above

In the future I will also support VPD, which will be used as a substitute for EFI variables, in this specific case to hold the boot order of the various boot entries.

uinit

The uinit program just wraps netboot and localboot in a forever-loop logic, just like your BIOS/UEFI would do. At the moment it just loops between netboot and localboot in this order, but I plan to make this more flexible and configurable.

How to build systemboot

  • Install a recent version of Go, we recommend 1.10 or later
  • make sure that your PATH points appropriately to wherever Go stores the go-get'ed executables
  • Then build it with the u-root ramfs builder using the following commands:
go get -u github.com/u-root/u-root
go get -u github.com/systemboot/systemboot/{uinit,localboot,netboot}
u-root -build=bb core github.com/systemboot/systemboot/{uinit,localboot,netboot}

The initramfs will be located in /tmp/initramfs_${platform}_${arch}.cpio.

More detailed information about the build process for a full LinuxBoot firmware image using u-root/systemboot and coreboot can be found in the LinuxBoot book chapter 11, LinuxBoot using coreboot, u-root and systemboot.

Example: LinuxBoot with coreboot

One of the ways to create a LinuxBoot system firmware is by using coreboot do the basic silicon and DRAM initialization, and then run Linux as payload, with u-root and systemboot as initramfs. See the following diagram:

LinuxBoot and coreboot (images from coreboot.org and wikipedia.org, diagram generated with draw.io)

Build and run as a fully open source bootloader in Qemu

Systemboot is one of the parts of a bigger picture: running Linux as firmware. We call this LinuxBoot, and it can be achieved in various ways. One of these is by combining coreboot, Linux, u-root and systemboot. Check out the instructions on the LinuxBoot using coreboot, u-root and systemboot chapter of the LinuxBoot Book.

TODO

  • verified and measured boot
  • a proper GRUB config parser
  • backwards compatibility with BIOS-style partitions
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].