logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://hacktivis.me/git/bootstrap-initrd.git
commit: 483b5b4d2712315f34ae00614e8031eef9cfb452
parent bb51173300fdadc544ad3d6f2039198899f17628
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 16 May 2024 14:54:52 +0200

README: Detail arch support, QEMU kernel, and ed(1) is present

Diffstat:

MREADME.md19+++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md @@ -22,8 +22,14 @@ A initrd generator for Linux to bootstrap a POSIX-ish system from a reasonably s ## Architectures -You can set `ALPINE_ARCH` to change the architecture, by default it's set to `x86_64` but `x86` (32-bit) is supported as well. -aarch64/armhf/armv7/riscv64/… can also be built but are untested. +You can set `ALPINE_ARCH` to change the architecture, by default it's set to `x86_64`. + +- `aarch64`: Untested +- `armhf`: Untested +- `armv7`: Untested +- `riscv64`: Broken, tcc snapshot needs to be updated +- `x86`: Works +- `x86_64` (aka amd64): Works ## Rationales Each of those roughly by their build order. @@ -138,16 +144,17 @@ Meanwhile: - e2fsprogs: In case you need to format some extra storage ## Launching in QEMU +* You need a Linux kernel, so far no known limitations are known +* Combination of `panic=1` and `-no-reboot` allows to exit+relaunch + ``` -$ qemu-system-x86_64 -enable-kvm -m 512 -kernel /boot/vmlinuz-6.6.21-gentoo -initrd /tmp/initramfs-tcc-x86_64.cpio.xz -append 'init=/init console=ttyS0 panic=1' -nographic -no-reboot +$ ./make-initrd.sh && qemu-system-x86_64 -enable-kvm -m 512 -kernel /boot/vmlinuz-6.6.21-gentoo -initrd initramfs-tcc-x86_64.cpio.xz -append 'init=/init console=ttyS0 panic=1' -nographic -no-reboot ``` -* Combination of `panic=1` and `-no-reboot` allows to exit+relaunch - ## Dev setup via bubblewrap ``` $ ./make-root.sh && bwrap --clearenv --unshare-all --bind initramfs-tcc-x86_64/ / --proc /proc --dev /dev --uid 0 /init ``` -Useful as it allows to manipulate the environment externally (there's no `sed -i` nor editors yet…). +Useful as it allows to manipulate the environment externally, for example to edit files in an editor more comfortable than `ed(1)`.