README.md (2547B)
- # bootstrap-initrd
- ```
- Copyright 2017 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
- SPDX-License-Identifier: MPL-2.0
- ```
- A initrd generator for Linux to bootstrap a POSIX-ish system from a reasonably small binary seed.
- ## Status
- - [x] Small binary seed of only TCC and musl (~1.2MB of binaries, depending on the architecture), enforced by [deblob](https://hacktivis.me/projects/deblob)
- - [x] Capable of bootstrapping <https://git.sr.ht/~mcf/oasis>
- - [ ] Self-replicating: Able to reassemble the initrd with Alpine apks
- - [ ] Self-hosting: Able to recompile all the software used from source (including tcc and musl)
- - [x] Code compiled by `init.sh` is reviewable, mostly thanks to a lack of autotools
- ## Explorations
- - Reduce the binary seed even further, without compromising on keeping the bootstrapping simple and reasonably fast
- ## Non-Goals
- - GNU Environment, there is already <https://github.com/fosslinux/live-bootstrap> for this and it's a massive effort
- - Become a distro, at worst it should end up deferring to an existing ports system like <https://www.pkgsrc.org/>
- ## Architectures
- You can set `ALPINE_ARCH` to change the architecture, by default it's set to `x86_64`.
- - `aarch64`: Works except for extras (tested on HoneyComb LX2k with linux 6.12.21-gentoo)
- - `armhf`: Untested
- - `armv7`: Untested
- - `riscv64`: Works except for extras (tested on VisionFive2 with linux-lts from Alpine)
- - `x86`: Works
- - `x86_64` (aka amd64): Works
- ## Rationales
- Moved to RATIONALES.md
- ## Extras
- The `/extras` directory is for software which is either specific
- to bootstrapping a particular system, or software which contains
- pregenerated code rather than 100% source code.
- You can automatically build all of it with `/extras-build-all.sh`
- You can exclude those tarballs from the initrd with setting
- the `EXCLUDE_EXTRAS` environment variable to any value.
- ## Launching in QEMU
- * You need a Linux kernel, so far no known version limitations
- * Combination of `panic=1` and `-no-reboot` allows to exit+relaunch
- ```
- $ ./make-initrd.sh && qemu-system-x86_64 -enable-kvm -m 512 -kernel /boot/vmlinuz-6.6.21-gentoo -initrd bootstrap-initrd/x86_64+extras.cpio.gz -append 'init=/init console=ttyS0 panic=1' -nographic -no-reboot
- ```
- ## Dev setup via bubblewrap
- ```
- $ ./make-root.sh && bwrap --clearenv --unshare-all --bind bootstrap-initrd/x86_64+extras/ / --proc /proc --dev /dev --uid 0 --gid 0 /init
- ```
- Useful as it allows to manipulate the environment externally, for example to edit files in an editor more comfortable than `ed(1)`.