{"id":13509916,"url":"https://github.com/systemboot/systemboot","last_synced_at":"2025-12-15T04:02:57.391Z","repository":{"id":73017341,"uuid":"130732228","full_name":"systemboot/systemboot","owner":"systemboot","description":"SystemBoot is a LinuxBoot distribution that works as a system firmware + bootloader, based on u-root","archived":true,"fork":false,"pushed_at":"2019-07-07T18:08:29.000Z","size":102084,"stargazers_count":113,"open_issues_count":32,"forks_count":17,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-23T16:43:19.726Z","etag":null,"topics":["boot","bootloader","coreboot","dhcp","firmware","kernel","kexec","netboot","uefi","vpd"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/systemboot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-23T17:26:07.000Z","updated_at":"2025-02-17T17:44:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"99fd0264-5dfd-4bd0-ab84-a8b157ac3cc4","html_url":"https://github.com/systemboot/systemboot","commit_stats":null,"previous_names":["insomniacslk/systemboot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemboot%2Fsystemboot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemboot%2Fsystemboot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemboot%2Fsystemboot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemboot%2Fsystemboot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemboot","download_url":"https://codeload.github.com/systemboot/systemboot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246338555,"owners_count":20761402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boot","bootloader","coreboot","dhcp","firmware","kernel","kexec","netboot","uefi","vpd"],"created_at":"2024-08-01T02:01:17.043Z","updated_at":"2025-12-15T04:02:52.061Z","avatar_url":"https://github.com/systemboot.png","language":"Go","readme":"# systemboot\n\n[![Build Status](https://travis-ci.org/systemboot/systemboot.svg?branch=master)](https://travis-ci.org/systemboot/systemboot)\n[![codecov](https://codecov.io/gh/systemboot/systemboot/branch/master/graph/badge.svg)](https://codecov.io/gh/systemboot/systemboot)\n[![Go Report Card](https://goreportcard.com/badge/github.com/systemboot/systemboot)](https://goreportcard.com/report/github.com/systemboot/systemboot)\n\n\u003e Note: systemboot [has been merged into u-root](https://github.com/u-root/u-root/pull/1255).\n\u003e This repository is now read-only and staying only for historical reasons, but you should build\n\u003e your bootloader entirely from u-root.\n\u003e How? The CLI tools have been moved under [u-root/cmds/boot](https://github.com/u-root/u-root/tree/master/cmds/boot/){fbnetboot,localboot,uinit},\n\u003e the libraries under [u-root/pkg/]{bootconfig,booter,checker,crypto,recovery,rng,storage,vpd}.\n\u003e [u-root/tools/vpdbootmanager](https://github.com/u-root/u-root/tree/master/tools/vpdbootmanager) and\n\u003e [u-root/examples/fixmynetboot](https://github.com/u-root/u-root/tree/master/examples/fixmynetboot).\n\nSystemBoot is a distribution for LinuxBoot to create a system firmware + bootloader. It is based on [u-root](https://github.com/u-root/u-root). The provided programs are:\n\n* `netboot`: a network boot client that uses DHCP and HTTP to get a boot program based on Linux, and uses kexec to run it\n* `localboot`: a tool that finds bootable kernel configurations on the local disks and boots them\n* `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.\n\nThis 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.\n\nThis 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.\n\nThe next sections go into further details.\n\n## netboot\n\nThe `netboot` client has the duty of configuring the network, downloading a boot program, and kexec'ing it.\nOptionally, the network configuration can be obtained via SLAAC and the boot program URL can be overridden to use a known endpoint.\n\nIn its DHCP-mode operation, `netboot` does the following:\n* bring up the selected network interface (`eth0` by default)\n* make a DHCPv6 transaction asking for network configuration, DNS, and a boot file URL\n* extract network and DNS configuration from the DHCP reply and configure the interface\n* 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)\n* kexec the downloaded boot program\n\nThere 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.\n\n## localboot\n\nThe `localboot` program looks for bootable kernels on attached storage and tries to boot them in order, until one succeeds.\nIn the future it will support a configurable boot order, but for that I need [Google VPD](https://chromium.googlesource.com/chromiumos/platform/vpd/) support, which will come soon.\n\nIn the current mode, `localboot` does the following:\n* look for all the locally attached block devices\n* try to mount them with all the available file systems\n* look for a GRUB configuration on each mounted partition\n* look for valid kernel configurations in each GRUB config\n* try to boot (via kexec) each valid kernel/ramfs combination found above\n\nIn 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.\n\n## uinit\n\nThe `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.\n\n## How to build systemboot\n\n* Install a recent version of Go, we recommend 1.10 or later\n* make sure that your PATH points appropriately to wherever Go stores the\n  go-get'ed executables\n* Then build it with the `u-root` ramfs builder using the following commands:\n\n```\ngo get -u github.com/u-root/u-root\ngo get -u github.com/systemboot/systemboot/{uinit,localboot,netboot}\nu-root -build=bb core github.com/systemboot/systemboot/{uinit,localboot,netboot}\n```\n\nThe initramfs will be located in `/tmp/initramfs_${platform}_${arch}.cpio`.\n\nMore detailed information about the build process for a full LinuxBoot firmware image\nusing u-root/systemboot and coreboot can be found in the [LinuxBoot book](https://github.com/linuxboot/book)\nchapter 11, [LinuxBoot using coreboot, u-root and systemboot](https://github.com/linuxboot/book/blob/master/11.coreboot.u-root.systemboot/README.md).\n\n## Example: LinuxBoot with coreboot\n\nOne of the ways to create a LinuxBoot system firmware is by using\n[coreboot](https://coreboot.org) do the basic silicon and DRAM initialization,\nand then run Linux as payload, with u-root and systemboot as initramfs. See the\nfollowing diagram:\n\n![LinuxBoot and coreboot](resources/LinuxBoot.png)\n(images from coreboot.org and wikipedia.org, diagram generated with draw.io)\n\n## Build and run as a fully open source bootloader in Qemu\n\nSystemboot is one of the parts of a bigger picture: running Linux as firmware.\nWe call this [LinuxBoot](https://linuxboot.org), and it can be achieved in various\nways. One of these is by combining [coreboot](https://coreboot.org), [Linux](https://kernel.org),\n[u-root](https://u-root.tk) and `systemboot`. Check out the instructions on the \n[LinuxBoot using coreboot, u-root and systemboot](https://github.com/linuxboot/book/tree/master/11.coreboot.u-root.systemboot)\nchapter of the [LinuxBoot Book](https://github.com/linuxboot/book).\n\n## TODO\n\n* verified and measured boot\n* a proper GRUB config parser\n* backwards compatibility with BIOS-style partitions\n","funding_links":[],"categories":["Go","kernel"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemboot%2Fsystemboot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemboot%2Fsystemboot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemboot%2Fsystemboot/lists"}