logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://hacktivis.me/git/bootstrap-initrd.git
commit: bc09d8b5d5ce7630180a167f74177a97475cf5c2
parent 09a8aedbd5f3ca21ebd271b4b90118a14f9e8d94
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 20 May 2024 22:32:37 +0200

Use bootstrap-initrd and arch subfolders as artifacts names

Diffstat:

MREADME.md6+++---
Mmake-initrd.sh4++--
Mmake-root.sh4++--
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md @@ -144,17 +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 +* 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 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 bootstrap-initrd/x86_64.cpio.xz -append 'init=/init console=ttyS0 panic=1' -nographic -no-reboot ``` ## Dev setup via bubblewrap ``` -$ ./make-root.sh && bwrap --clearenv --unshare-all --bind initramfs-tcc-x86_64/ / --proc /proc --dev /dev --uid 0 /init +$ ./make-root.sh && bwrap --clearenv --unshare-all --bind bootstrap-initrd/x86_64/ / --proc /proc --dev /dev --uid 0 /init ``` Useful as it allows to manipulate the environment externally, for example to edit files in an editor more comfortable than `ed(1)`. diff --git a/make-initrd.sh b/make-initrd.sh @@ -10,8 +10,8 @@ WORKDIR="$(realpath "$WORKDIR")" : ${ALPINE_ARCH:=x86_64} -name_base="initramfs-tcc-${ALPINE_ARCH}" -out_base="${WORKDIR}/${name_base}" +name_base="bootstrap-initrd" +out_base="${WORKDIR}/${name_base}/${ALPINE_ARCH}" set -ex diff --git a/make-root.sh b/make-root.sh @@ -62,8 +62,8 @@ WORKDIR="$(realpath "$WORKDIR")" : ${ALPINE_ARCH:=x86_64} -name_base="initramfs-tcc-${ALPINE_ARCH}" -out_base="${WORKDIR}/${name_base}" +name_base="bootstrap-initrd" +out_base="${WORKDIR}/${name_base}/${ALPINE_ARCH}" gen_loksh_tcc_h() { cd loksh-*/ || die