Evaluation of tools
Three general questions guide all software projects:
- what exists already? (implementations, tools and build systems)
- what needs development? (UIs and such)
- what is a good environment? (build + runtime)
Not only do we want to answer those questions. We also keep track of the options and decision process in this book in order for readers to make sense.
There are many existing tools already that we can leverage to implement the idea of using Linux to boot into an operating system.
Root filesystem
Linux needs a root filesystem with at least one binary that is called
init
. Since booting a system
is a cumbersome task, additional tools aid in both development and investigating
possible issues.
Core utilities
Unix already came with lots of little utilities for the user of the system, which may be anyone from a system developer to an administrator of a shared or provided system, or an end user. Further tools have been created over the years, and the GNU core utilities are essentially a collection of tools resulting from merging other collections. Note that there are still many other utilities that are not part of coreutils. At the same time, there are multiple other implementations now, which differ in terms of arguments and flags and possibly additional utilities they include.
tool | language | license | usage |
---|---|---|---|
BusyBox | C | GPLv2 | Heads |
toybox | C | 0BSD | Android |
GNU coreutils | C | GPLv3 | not for LinuxBoot |
u-root | Go | BSD 3-Clause | ByteDance, Google et al |
uutils/coreutils | Rust | MIT | not for LinuxBoot |
kexec implementations
While kexec itself is a Linux syscall, it is not a one-shot operation. Loading multiple segments into memory, synchronizing and unmounting file systems, and the eventual syscall to reboot belong to the procedure. In addition, there are architecture specifics to take into account. Thus, there are multiple implementations of kexec, which are Linux programs that offer their own interfaces again to pass extra arguments. Besides those standalone implementations, there are also specialized boot loaders based on kexec that have their own extra logic, such as FreeBSD's kload or petitboot.
tool | language | license | usage |
---|---|---|---|
kexec-tools (GitHub mirror) | C | GPLv2 | Heads, Petitboot |
systemd (wrapper) | C | LGPL-2.1+ | systemd on UEFI |
kexecboot | C | GPLv2 | ? |
u-root (CLI+mod) | Go | BSD 3-Clause | Google et al |
kexlinux | Rust | LGPL-3.0+ | ? |