Goal is to have mimimal but realistic node with network capabilities build in (ip
) and bootstrapped (similar to alpine's netbot (example)). Clearlinux is interesting. This is using musl (which alpine uses) rather than glibc to support staticaly built binaries more easily.
- Given a built linux kernel (e.g.
vmlinuz-lts
) - Clone and build all the various packages you want
- Write an
init
script - Build all the binaries +
init
script into a initramfs - Run/boot with qemu
- Rememebr busybox needs to be static build (see .config)
dropbear needs at least adropbear_rsa_host_key
key config or will not start see gist- Prefering openssh for end user compatability (statically built)
TODO: add iproute2 for minimal routing.
See ./build-all.sh
- Automated ci
### How do I build statically coreutils, do I even need to?
See https://lists.gnu.org/archive/html/coreutils/2019-04/msg00001.html switched to using musl
.
See also
https://wiki.gentoo.org/wiki/Custom_Initramfs https://unix.stackexchange.com/a/305406 https://landley.net/writing/rootfs-howto.html https://landley.net/writing/rootfs-programming.html
- https://unix.stackexchange.com/questions/193066/how-to-unlock-account-for-public-key-ssh-authorization-but-not-for-password-aut
- https://stackoverflow.com/a/79151188
- https://z49x2vmq.github.io/2020/12/24/linux-tiny-qemu/
"Stuff like this is slowly becoming a lost art" src ooopse.
TODO: kernel inital ram disk support https://stackoverflow.com/questions/14430551/qemu-boot-error-swapper-used-greatest-stack-depth TODO READ: https://bbs.archlinux.org/viewtopic.php?pid=1378903#p1378903
"busybox qemu /bin/sh: can't access tty; job control turned off" https://github.com/brgl/busybox/blob/master/shell/cttyhack.c